# File: global08.py # # Functions can call functions, but the # scope of b is still determined lexically. # It doesn't matter that in the second call # to test() from foo() that the function foo() # has a local variable b. The variable b # in test() is still (always) global. # b = 101 def test() : print("b = ", b) return def foo() : b = 202 test() return b = 303 test() foo() ''' Output from the program: b = 303 b = 303 '''