fork download
  1. x = 50
  2.  
  3. def func_outer():
  4. global x
  5. print('x равно', x)
  6. x = 2
  7. print('x равно', x)
  8.  
  9. def func_inner():
  10. global x
  11. x = 5
  12.  
  13. func_inner()
  14. print('x =', x)
  15.  
  16. func_outer()
Success #stdin #stdout 0.02s 27704KB
stdin
Standard input is empty
stdout
x равно 50
x равно 2
x = 5