Home
Press ? for keyboard navigation
❮
Scoping: global seen from fuction
Local scope gone wrong
❯
Assignment creates local scope
examples/advanced/scoping_external_variable_fixed.py
a
=
42
def
f
():
a
=
23
print
(
a
)
print
(
'ok'
)
print
(
a
)
f
()
print
(
a
)
ok 42 23 42
Index (i)
Table of Contents (t)
Indexed keywords (k)
Chapter TOC (d)
Hide/Show (h)