Skip to content

Instantly share code, notes, and snippets.

@werterzz
Created October 17, 2022 16:30
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 werterzz/6543bdb098e8e327ce3d49066a0f8ab4 to your computer and use it in GitHub Desktop.
Save werterzz/6543bdb098e8e327ce3d49066a0f8ab4 to your computer and use it in GitHub Desktop.
# global scope
outer = "eggshell"
def egg():
# enclosing scope
middle = "egg white"
def inner_egg():
# local scope
inner = "yolk"
print("global scope: " + outer)
print("enclosing scope: " + middle)
print("local scope: " + inner)
inner_egg()
# built-in scope (preserve keyword ex. if, for, break, continue)
return True
egg()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment