The code should be like this for multiplication of two matrices in python-
# take a 3x3 matrix
C = [[1,1,1],
[1,1,1], [1,1,1]]
# take a 3x4 matrix
D= [[2,2,2, 2],
[2,2,2,2],
[2,2,2,2]]
R = [[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]
# iterating by row of A
for i in range(len(C)):
# iterating by column by D
for j in range(len(D[0])):
# iterating by rows of D
for k in range(len(D)):
R[i][j] += C[i][k] * D[k][j]
for s in result:
print(s)
output-
[[6,6,6,6],
[6,6,6,6],
[6,6,6,6]]