#this is one method to read the matrix from user when the elements of matrix
#are given in separate line
r=int(input())
c=int(input())
m=[]
for i in range(r):
a=[]
for j in range(c):
a.append(int(input()))
m.append(a)
print(m)
To embed this project on your website, copy the following code and paste it into your website's HTML: