fork(1) download
  1. def value(x):
  2. x = 1
  3. def ref(x):
  4. x[0] = 1
  5. x = 0
  6. value(x)
  7. print(x)
  8. x = [0]
  9. ref(x)
  10. print(x[0])
  11.  
  12. #https://pt.stackoverflow.com/q/255451/101
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
0
1