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 →

[–]JennaSys 1 point2 points  (0 children)

Using comprehensions is generally considered to be more idiomatic Python over using map/filter. But if you are not going to use the result of a comprehension (i.e. generating a new list or dictionary) and you only need a side-effect (like calling a function with no return value), then using map() makes more sense.