Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Why Use the map() Function?

Give Feedback

Now that you know how to use the map() function, you’ll review why you might want to use it. You can use this function to write your code in a functional way to input an immutable data structure and define the transformations you want to make, in a declarative way.

When you take this approach, you have a series of steps that are independent from each other and don’t modify your data set. This allows you to keep adding more steps to your program, avoid side effects, and ensure that your data set is still usable.

Comments & Discussion

amicablezebra on April 16, 2020

Seems slightly sloppy with calling things a ‘list’? Happens kinda frequently when he calls a tuple a list. Sorta freaked me out.

Become a Member to join the conversation.