Python: everyday idioms
An example course: small Python problems built around the idioms you reach for every day (slicing, comprehensions, zip, enumerate, sets and the built-ins). Each one is a few minutes of real code, checked by tests.
The point isn't to finish it. Switch on a chapter, let the reviews come back, and notice which ones you can still write cold a month from now. Then make cards like these for the things you keep looking up.
What's inside
- Strings and lists
Slicing, splitting and joining. Most of these are one line once you know the idiom, which is exactly why they're easy to forget.
- Comprehensions and built-ins
The parts of Python that replace loops. If you find yourself writing result = [] and append, there's probably a one-liner here.
- Classic algorithms
Short problems that come up again and again, in interviews and in real code. Each has a neat solution worth knowing by heart.