Skip to content

Instantly share code, notes, and snippets.

@volgoweb
Created April 28, 2017 15:13
Show Gist options
  • Save volgoweb/55f235438806917071e204b7c427429b to your computer and use it in GitHub Desktop.
Save volgoweb/55f235438806917071e204b7c427429b to your computer and use it in GitHub Desktop.
def multipliers():
return (lambda x: i*x for i in range(4)]
print [m(2) for m in multipliers()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment