Python's map() Function: Transforming Iterables

Python’s map() is a built-in function that allows you to process and transform all the items in an iterable without using an explicit for loop, a technique commonly known as mapping. map() is useful when you need to apply a transformation function to each item in an iterable and transform them into a new iterable. map() is one of the tools that support a functional programming style in Python.

In this course, you’ll learn:

  • How Python’s map() works
  • How to transform different types of Python iterables using map()
  • How to combine map() with other functional tools to perform more complex transformations
  • What tools you can use to replace map() and make your code more Pythonic

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Cesar Aguilar

Cesar is an avid Pythonista and records video tutorials for Real Python. He enjoys teaching programming to anyone who listens and seeing in others their programming "eureka" moment.

» More about Cesar

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for Shubha

Shubha on Nov. 2, 2021

Great Course, thank you!

Avatar image for subinmath

subinmath on Sept. 11, 2021

This was really great. Thanks!

« Browse All Courses