Re:Python List Comprehensions Explained Visually
by TheCowboy on Wednesday December 02, 2015 @11:50PM
(#10667817)
I find the utility of list comprehensions is maximized when I'm in a Python shell and dealing with indentation when writing a loop can become obnoxious to edit. I tend to have a Python shell tab open in my terminal throughout the day, and it's nice to bang out a quick loop in a one-liner.
When writing actual code, I tend to stick with regular for loops.
I work on a project that's written mostly in Python; on occasion, other coworkers have to edit/work with my code and they're not used to Python at all, so I find myself writing for loops instead of list comprehensions for clarity.