examples/advanced/scoping_external_variable_fixed.py
a = 42
def f():
    a = 23
    print(a)

print('ok')
print(a)
f()
print(a)

examples/advanced/scoping_external_variable_fixed.out
ok
42
23
42