Changing the value of a variable b, which is a copy of a, also changes the value of a.
a = [[0]]
b = a.copy()
print("a before", a)
b[0][0] = 1
print("a after ", a)
prints:
a before [[0]]
a after [[1]]
Although this works:
a = [0]
b = a.copy()
print("a before", a)
b[0] = 1
print("a after ", a)
prints:
a before [[0]]
a after [[0]]