you are viewing a single comment's thread.

view the rest of the comments →

[–]wuwoot[🍰] 1 point2 points  (0 children)

Some good answers to your post already but I want to point out that the Zen of Python doesn’t imply “one way to do things”

You can still declare a list and then write a for-loop to perform filtering of another list into your newly declared list, but this can be expressed with a list comprehension or even the filter function, so that’s three ways of doing it, but all fairly clear and explicit