Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.