def f(lst): return sum( ([x] if not isinstance(x, list) else f(x) for x in lst), [] ) f([[[2,3], [[3]], 3, [4]], 6])What is the output of the above code?
https://pollev.com/slade You may also download the app to your phone. Use the "slade" poll id.
Last fall, the New Yorker ran the above cartoon. At first, I thought it referred to our exams.
The midterm will be Thursday October 12 at 7pm in WLH 207. It will be a 2 hour hand written exam. No computers. No notes. No books. No kidding. Students registered with Student Accessbility Services will take the exam in room WLH 211, down the hall.
Here is a practice exam. (solutions). Practice UNIX script. (solutions). UNIX review slides.
mt.py code for practice midterm
Here is a great resource to practice regular expressions https://regex101.com/ Also, see www.regular-expressions.info which has a tutorial as well as useful examples, including HTML tags, email addresss, IP addresses, dates, credit cards, and lots more.
Review hw2.