I tried to create this code to input an m by n matrix. I intended to input [[1,2,3],[4,5,6]] but the code yields [[4,5,6],[4,5,6]. Same things happ
[[1,2,3],[4,5,6]]
[[4,5,6],[4,5,6]
If the input is formatted like this,
1 2 3 4 5 6 7 8 9
a one liner can be used
mat = [list(map(int,input().split())) for i in range(row)]