matrices python code example
Example 1: crear matriz python for
matriz = []
for i in range(numero_filas):
matriz.append([])
for j in range(numero_columnas):
matriz[i].append(None)
Example 2: matrix using python
R = int(input("Enter the number of rows:"))
C = int(input("Enter the number of columns:"))
matrix = []
print("Enter the entries rowwise:")
for i in range(R):
a =[]
for j in range(C):
a.append(int(input()))
matrix.append(a)
for i in range(R):
for j in range(C):
print(matrix[i][j], end = " ")
print()