class Name: def __init__ (self,a ): self.a = a l =[42] x = Name(l[0]) print (x.a) l[0]= 23print(x.a)
Standard input is empty
42 42
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!