Last active
October 13, 2019 06:48
-
-
Save adrianmarkperea/881b2eda34793c2f29107102f07378a9 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
i_am_global = 5 | |
def foo(): | |
global i_am_global | |
i_am_global = 10 | |
print(i_am_global) | |
foo() | |
print(i_am_global) | |
# outputs | |
10 | |
10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment