class tmp: def __init__(self,t): self.t=t t1 = tmp([1,2,3])t2 = tmp([4,5,6])t1=t2t1.t[0]=0t2.t[1]=0print(t1.t)print(t2.t)
Standard input is empty
[0, 0, 6] [0, 0, 6]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!