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]
You can make any dimension of list
list=[] n= int(input()) for i in range(0,n) : #num = input() list.append(input().split()) print(list)
output: