The map function executes the function_object for each element in the sequence and returns a list of the elements modified by the function object.
syntax:
map(function_object, iterable1, iterable2,...)
Example:
def multiply2(x):
return x * 2
map(multiply2, [1, 2, 3, 4]) # Output [2, 4, 6, 8]
map executes multiply2 function for each element in the list i.e. 1, 2, 3, 4 and returns [2, 4, 6, 8]