fork download
  1. # your code goes here
  2. x=1
  3. def g():
  4. global x
  5. print x
  6. x=2
  7.  
  8. def f():
  9. x=3
  10. g()
  11. f()
  12. print x
Success #stdin #stdout 0.02s 7080KB
stdin
Standard input is empty
stdout
1
2