ch01
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# Local versus Global
|
||||
|
||||
# we define a function, called local
|
||||
def local():
|
||||
m = 7
|
||||
print(m)
|
||||
|
||||
# we define m within the global scope
|
||||
m = 5
|
||||
|
||||
# we call, or `execute` the function local
|
||||
local()
|
||||
|
||||
print(m)
|
||||
Reference in New Issue
Block a user