LEGB Lookup Skips to Enclosing
x = "global"
def outer():
x = "enclosing"
def inner():
print(x)
inner()
outer()
What does calling outer() print?
Sign in to answer questions and track your progress
Sign Inx = "global"
def outer():
x = "enclosing"
def inner():
print(x)
inner()
outer()
What does calling outer() print?
Sign in to answer questions and track your progress
Sign In