In this lesson, you’ll learn 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.
You’ll walk through a practical example of how to use the map()
function with the example data set that you’ve been working with in this course so far. You’ll know how to get a new iterable containing all of the information that you need from the old iterable, but you won’t modify the old iterable in the process!
Shay Elmualem on Aug. 3, 2019
This is great stuff Dan, thanks! I normally, out of habit, just go with the “manual” approach of iterating/looping over and just getting/saving the data I need, I really need to start using these built-ins more! very cool.