x = 1 # scoping
y = 2 # y is closure
def a():
global x
z = 1
def inner():
nonlocal z #include func only
z = z + 1
x = z + 1
print(x)
print(z)
x = y + 1
return inner
def b():
global x
c = a()
y = 1
x = x + 2
c()
outer_func = a()
outer_func()
outer_func()
b()