-
-
Save velotiotech/c2ccf3f3ea50ae5aa0d413c8d5d0e45d 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
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