Whats map in python 3.5?

What is map in python 3.5?

dict is like map . It is a hashtable rather than a b-tree

\texttt{map(f,A)} is a function that applies a function \texttt{f} to a list \texttt{A}. For example you might see people do input reading by \texttt{map(int,input().split())}. Note that this is the alternative to using \texttt{[int(x) for x in input().split()]}.

There is actually a small difference between the two expressions. \texttt{[int(x) for x in input().split()]} returns a list while \texttt{map(int,input().split())} returns a generator, to make them equivalent do \texttt{list(map(int,input().split()))}.

Some examples of using map together with some other related functions.