Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 4
    Generator expressions are simpler. Commented Mar 2, 2010 at 8:34
  • 2
    (i)filter and (i)map can make sense for cases where the functions being applied already exist, but in a situation like this it makes a lot more sense just to use a generator expression. Commented Mar 2, 2010 at 16:53
  • This is the best answer. Avoid list comprehensions xahlee.info/comp/list_comprehension.html
    – mit
    Commented Oct 29, 2018 at 20:54