Created
October 8, 2020 07:00
-
-
Save sevperez/7625c3123838416b579bd3dfa10ca57e 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
s = [1, 2, 3, 4, 5] | |
def foo(l, bar): | |
return list(map(bar, l)) | |
print(foo(s, lambda x: x * 2)) # [2, 4, 6, 8, 10] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment