Python3 Func Map
# Python3.x Python3 map() Function
[ Python3 Built-in Functions](#)
* * *
## Description
The map() function applies a given function to each item of an iterable (like a list, tuple, etc.) and returns an iterator.
The first parameter, function, is called with each element from the iterable sequences as its argument. It returns a new iterator containing the return values from each function call.
### Syntax
Here is the syntax for the map() method:
map(function, iterable, ...)
### Parameters
* function -- A function
* iterable -- One or more sequences
## Return Value
Returns an iterator.
* * *
## Examples
The following examples demonstrate the usage of map():
## Python3.x Examples
>>>def square(x) : # Calculate square number
... return x ** 2
...
>>>map(square,[1,2,3,4,5])# Calculate the square of each element in the list
YouTip