Skip to content

Instantly share code, notes, and snippets.

@sevperez
Created October 8, 2020 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sevperez/15d191751edbcc1ec53a172ed2ae194c to your computer and use it in GitHub Desktop.
Save sevperez/15d191751edbcc1ec53a172ed2ae194c to your computer and use it in GitHub Desktop.
def double(num):
return num * 2
my_numbers = [1, 2, 3, 4, 5]
doubled_numbers = list(map(double, my_numbers))
print(doubled_numbers) # [2, 4, 6, 8, 10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment