Created
November 21, 2018 05:53
-
-
Save JackInTaiwan/553a37cdb65e567b96daeb86e243ecd0 to your computer and use it in GitHub Desktop.
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 dog(): | |
height = 40 | |
def grow_up(): | |
nonlocal height | |
height = height + 1 | |
print("Thanks for making me growing up. I'm now {} meters !!!!".format(height)) | |
return grow_up | |
if __name__ == "__main__": | |
dog_grow_up = dog() | |
dog_grow_up() | |
# > Thanks for making me growing up. I'm now 41 meters !!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment