fork(1) download
  1. class tmp:
  2. def __init__(self,t):
  3. self.t=t
  4.  
  5. t1 = tmp([1,2,3])
  6. t2 = tmp([4,5,6])
  7. t1=t2
  8. t1.t[0]=0
  9. t2.t[1]=0
  10. print(t1.t)
  11. print(t2.t)
Success #stdin #stdout 0.01s 9992KB
stdin
Standard input is empty
stdout
[0, 0, 6]
[0, 0, 6]