My program starts off like this
array=[[[0,0]]*4]*4
for i in range(4):
for k in range(4):
array[i][k]=[i,k]
for n in range(4):
print(array[n])
but outputs this
[[3, 0], [3, 1], [3, 2], [3, 3]]
[[3, 0], [3, 1], [3, 2], [3, 3]]
[[3, 0], [3, 1], [3, 2], [3, 3]]```
I'm using 3.11, I tried switching i and k around, switching the names for the variables, doing
array[i][k][0]=k array[i][k][1]=i
etc. but none of it has worked. I want it to output
```[[0, 0], [0, 1], [0, 2], [0, 3]]
[[1, 0], [1, 1], [1, 2], [1, 3]]
[[2, 0], [2, 1], [2, 2], [2, 3]]
[[3, 0], [3, 1], [3, 2], [3, 3]]```