0
How to input the matrix
how to input line and colum
2 Answers
0
You can input an array by using multiple input statements for each column. Then you can store each row separately or use list of lists.
Like
rows = []
row = 4
for i in range(row):
rows.append(input().split())
0
a = []
n = int(input('Input number of rows: '))
k = int(input('Input number of columns: '))
for i in range(k):
a.append([])
for j in range(n):
a[i].append(int(input()))