for i in range(len(arr)):
temps = [[0]*9]*3
# temp = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0,
0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]
when tries
temps[0][0] = 4
gives this output
[[4, 0, 0, 0, 0, 0, 0, 0, 0], [4, 0, 0, 0, 0, 0, 0,
0, 0], [4, 0, 0, 0, 0, 0, 0, 0, 0]]
tries to change the value of temp[0][0] it changes all temp[0][0] temp[0][1] temp[0][2] value