4 ms·
I’ve been using Python as my primary language since before it had list comprehensions and I still find nested comprehensions to be hard to comprehend, hard to c
by js2 4y ago
I’ve been using Python as my primary language since before it had list comprehensions and I still find nested comprehensions to be hard to comprehend, hard to compose, and hard to refactor.
I usually resort to building up generator expressions, using itertools, or writing traditional loops.
$0.02.