Skip to content

Instantly share code, notes, and snippets.

@sevperez
Created October 8, 2020 07:00
Show Gist options
  • Save sevperez/7625c3123838416b579bd3dfa10ca57e to your computer and use it in GitHub Desktop.
Save sevperez/7625c3123838416b579bd3dfa10ca57e to your computer and use it in GitHub Desktop.
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