Created
October 8, 2020 07:00
-
-
Save sevperez/15d191751edbcc1ec53a172ed2ae194c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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