# File: global09.py # # The value of the local variable b # goes away after the function returns. # # Thus, b is undefined in the second call # to test() # b = 101 def test() : if x == 11: b = 17 print("b = ", b) return x = 11 test() x = 44 test() ''' Output from the program: b = 17 Traceback (most recent call last): File "global09.py", line 22, in test() File "global09.py", line 15, in test print("b = ", b) UnboundLocalError: local variable 'b' referenced before assignment '''