Created
September 13, 2016 22:09
-
-
Save hackjutsu/1fd659252184063af1cfca6e13662b72 to your computer and use it in GitHub Desktop.
Demo for functional programming map() in Python
This file contains 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 square(x): | |
return x**2 | |
squares = map(square, range(10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment