Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created May 10, 2024 05:37
Show Gist options
  • Save velotiotech/c2ccf3f3ea50ae5aa0d413c8d5d0e45d to your computer and use it in GitHub Desktop.
Save velotiotech/c2ccf3f3ea50ae5aa0d413c8d5d0e45d to your computer and use it in GitHub Desktop.
def outer_function():
x = 10
def inner_function():
nonlocal x
x += 5
print("Inner:", x)
inner_function()
print("Outer:", x)
outer_function()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment