# map function
city_lengths = map(len, ['sanjose', 'cupertino', 'sunnyvale', 'fremont'])
print(list(city_lengths))
# [7, 9, 9, 7]
# Map takes a function and a collection of items. It makes a new, empty collection, runs the function on each item in the original collection and inserts each return value into the new collection. It returns the new collection.