1R = int(input("Enter the number of rows:"))
2C = int(input("Enter the number of columns:"))
3
4# Initialize matrix
5matrix = []
6print("Enter the entries rowwise:")
7
8# For user input
9for i in range(R): # A for loop for row entries
10 a =[]
11 for j in range(C): # A for loop for column entries
12 a.append(int(input()))
13 matrix.append(a)
14
15# For printing the matrix
16for i in range(R):
17 for j in range(C):
18 print(matrix[i][j], end = " ")
19 print()