defaultdict vs. setdefault
Stack Overflow is full of questions where the answer is to create a "multidict", a dict mapping each key to a list of values.
There are two ways to do this, using defaultdict, or using a regular dict with setdefault.
Lazy restartable iteration
The problem
Often, using an iterator lazily is better than generating a sequence (like the one you get from a list comprehension).
Arguments and parameters
A lot of people—not just novices—mix up parameters and arguments, especially when it comes to things like how default-valued parameters and keyword arguments, or argument unpacking and variable parameters.
3How grouper works
How grouper works
A very common question on StackOverflow is: "How do I split a sequence into evenly-sized chunks?"
If it's actually a sequence, rather than an arbitrary iterable, you can do this with slicing.