Global Keyword Inside Nested Functions
Mon 10 August 2026
x = 100
def outer():
def inner():
global x
x = 400
inner()
outer()
print(x)
400
Score: 10
Category: chapter13_global_and_scope
x = 100
def outer():
def inner():
global x
x = 400
inner()
outer()
print(x)
400
Score: 10
Category: chapter13_global_and_scope