Here is my code.
import numpy as np
m = 2
n = 2
arr = [[0]*m]*n
for i in np.arange(n):
for j in np.arange(m):
print(i)
arr[i][j] = i
print(arr)
the output is:
0
0
1
1
[[1,1],[1,1]]
I do not understand why the output array is not [[0,0],[1,1]]. Please I am losing my mind.