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]
rows, columns = list(map(int,input().split())) #input no. of row and column b=[] for i in range(rows): a=list(map(int,input().split())) b.append(a) print(b)
input
2 3 1 2 3 4 5 6
output [[1, 2, 3], [4, 5, 6]]