If you want to apply the given function to each item of a given iterable, use map.
The code above shows how this method works.
Link to the source code.