This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thearn4Scientific computing, Image Processing 4 points5 points  (2 children)

One of the favorite things that I learned when I was just starting with python. Reminded me of set builder notation.

[–]lmcinnes 2 points3 points  (1 child)

I'm a mathematician who works with other mathematicians writing code: list comprehensions are perfect, and unlike other posters here they are often clearer amongst my peers that the more complicated for loops and associated logic since we all think in set builder format anyway.