I want to update a copied list but when I do that it updates both the original and copied one
b=[1,2,3]
a=b
a[0]=2
print(a)
print(b)
but the value of b changed and became [2,2,3]
I want to update a copied list but when I do that it updates both the original and copied one
b=[1,2,3]
a=b
a[0]=2
print(a)
print(b)
but the value of b changed and became [2,2,3]