Skip to content

Instantly share code, notes, and snippets.

@ItsCosmas
Last active May 8, 2019 20:05
Show Gist options
  • Save ItsCosmas/778e00e92861ecd5f354e33046b3331a to your computer and use it in GitHub Desktop.
Save ItsCosmas/778e00e92861ecd5f354e33046b3331a to your computer and use it in GitHub Desktop.
Maps
#MAPS
def addFive(x):
return x + 5
nums = [11,22,33,44,55]
result = list(map(addFive,nums))
print(result)
nums = [11,22,33,44,55]
result = list(map(lambda x:x+5,nums))
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment