2 ms·
My personal rule is to use comprehensions when they improve readability and to avoid them when they don't. There's usually a threshold where I go "nope" and un
by andybak 5y ago
My personal rule is to use comprehensions when they improve readability and to avoid them when they don't.
There's usually a threshold where I go "nope" and unroll it into a good old loop.
But when you're in their sweet spot, they definitely improve readability.