Comprehension in Python
bennuttall.com
bennuttall.com
That being said, I find that whenever I make heavy use of comprehensions, I am often tempted by some evil urge to get sucked into ludicrously nested comprehensions leading to unreadable code.
It's not hard to fight these urges, when you get say, 2 lines deep and 4 nested comprehensions, but comprehensions do make it easy to obfuscate otherwise clear code.
Some things are better expressed as a comprehension, some things are not. So I suppose we must be constantly aware of the readability of our code.