This commit is contained in:
adii1823
2021-10-28 16:58:30 +05:30
parent 028f6992f4
commit ff85709895
19 changed files with 161 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# Local versus Global
def local():
# m doesn't belong to the scope defined by the local function
# so Python will keep looking into the next enclosing scope.
# m is finally found in the global scope
print(m, 'printing from the local scope')
m = 5
print(m, 'printing from the global scope')
local()