jjmark15
4/21/2017 - 8:35 PM

example of map function

example of map function

def add_five(x):
  return x + 5

nums = [11, 22, 33, 44, 55]
result = list(map(add_five, nums))
print(result)

'''
>>>
[16, 27, 38, 49, 60]
'''