a = [1]
b = a
a.append(2)
print(b)
-------output--------
[1,2]
Can anyone explain me the reason why b value is updated when we update the value of a ???
a = [1]
b = a
a.append(2)
print(b)
-------output--------
[1,2]
Can anyone explain me the reason why b value is updated when we update the value of a ???