Skip to content

Instantly share code, notes, and snippets.

@adrianmarkperea
Last active October 13, 2019 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianmarkperea/881b2eda34793c2f29107102f07378a9 to your computer and use it in GitHub Desktop.
Save adrianmarkperea/881b2eda34793c2f29107102f07378a9 to your computer and use it in GitHub Desktop.
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