.remove() has some behavior I don't understand.
x = [[1,2,3]]*3
x[0].remove(1)
then x becomes [[2, 3], [2, 3], [2, 3]]
.
Why does this happen, and how can I fix this? I want 1 removed from the first list only.
.remove() has some behavior I don't understand.
x = [[1,2,3]]*3
x[0].remove(1)
then x becomes [[2, 3], [2, 3], [2, 3]]
.
Why does this happen, and how can I fix this? I want 1 removed from the first list only.