The built-in map() function creates a map object using an existing list and a function as its parameters. This object can be converted to a list using the list() function.
The template for map() is as follows:
map(function, list)
The function will be applied, or mapped, to all the elements of the list.
Below, we’ll use map() to double the values of an existing list: