AI engineering glossary · Python core
What is map?
map: A built-in function that applies a given function to every item of an iterable and returns a lazy iterator of the results. It is an alternative to a list comprehension.
map: an example
list(map(len, ['a', 'bb', 'ccc'])) gives [1, 2, 3].
Related terms
More Python core terms
Where you learn it
map is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.