News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.