Created
July 25, 2012 13:21
-
-
Save kadirpekel/3176161 to your computer and use it in GitHub Desktop.
What is the output?
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 create_counter(): | |
i = 0 | |
def increment(): | |
i = i + 1 | |
print(i) | |
return increment | |
count = create_counter() | |
count() | |
count() | |
count() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hack https://gist.github.com/3176300