1 #!/usr/bin/env python 2 3 b = 2 4 5 def f(x): 6 b = x 7 8 def g(x): 9 global b 10 b = x 11 12 def h(): 13 b = b 14 c = b 15 b = 1 16 return c 17 18 f(3) 19 result_2 = b 20 g(4) 21 result1_4 = b 22 result2_4 = h() 23 result3_4 = b 24 25 # vim: tabstop=4 expandtab shiftwidth=4