b = [[1,1],[1,0]]
a = [[0]*2]*2
for i in range(2):
for j in range(2):
a[i][j] = b[i][j]
print(a)
print(b)
and the outputs are:
[[1,1],[1,0]]
[[1,0],[1,0]]
I don't know where going wrong. Isn't the a should be the exact same as the b?