The map() Function vs Generator Expressions
In the previous lesson, you covered how to use the
map() function in Python in order to apply a function to all of the elements of an iterable and output an iterator of items that are the result of that function being called on the items in the first iterator.
In this lesson, you’ll see how the
map() function relates to list comprehensions and generator expressions. You’ll learn that using them is (arguably) more Pythonic than relying on plain
Comments & Discussion
Become a Member to join the conversation.