I don't understand this behavior of lists in Python:
>>> a1 = [[0,0],[0,0]]>>> a2 = [[0]*2]*2>>> a1[[0, 0], [0, 0]]>>> a2[[0, 0], [0, 0]]>>> a1[0][0] = 1>>> a2[0][0] = 1>>> a1[[1, 0], [0, 0]]>>> a2[[1, 0], [1, 0]]
Why does assignment of one element affect another element?