Python multiplication matrices – Stack Overflow in Spanish

# Program to multiply two matrices using nested loops

# Matrix 3x3
X = [[12,7,3],
    [4 ,5,6],
    [7 ,8,9]]Matrix # 3x4
Y = [[5,8,1,2],
    [6,7,3,0],
    [4,5,9,1]]# result is 3x4
result = [[0,0,0,0],
         [0,0,0,0],
         [0,0,0,0]]# iterate through rows of X
for i in range (len (X)):
# iterate through Y columns
for j in range (len (Y[0])):
# iterate through rows of Y
for k in range (len (Y)):
result[i][j]    + = X[i][k]    * Y[k][j]







for r in the result:
print (r)

#exit:
[114, 160, 60, 27]
[74, 97, 73, 14]
[119, 157, 112, 23]