The class is given below, this will print 20_20. Now till the line 5 code is same, I don't want the value of T.a
to change when i change value of T1.a
. How to solve it?
class Test:
def __init__(self, val):
self.a = val
T = Test(10)
T1 = T
T1.a = 20
print T.a + '__' + T1.a
Expected Output Is 10_20 .