However, I would reject your `chunks` function in a code review and tell you to use `grouper` form the itertools recipes [1].
More generally,any time I've ended up with a long list comprehension, the answer has been to "check itertools and see how you would describe this ugly comprehension in those terms"
All of the recipes in the itertools documentation should pretty much be considered folklore imho. If you always use the 'zip((iterator,)n)' approach, people will recognize it and know immediately what you mean.
However, I would reject your `chunks` function in a code review and tell you to use `grouper` form the itertools recipes [1].
More generally,any time I've ended up with a long list comprehension, the answer has been to "check itertools and see how you would describe this ugly comprehension in those terms"
[1] https://docs.python.org/3/library/itertools.html#itertools-r...