We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abaf356 commit 7594ea7Copy full SHA for 7594ea7
docs/datastructure.rst
@@ -439,7 +439,7 @@ In this example we will multiply two matrices. First we will take input the numb
439
b.append([int(x) for x in input("").split(" ")])
440
c = []
441
for i in range(0, n):
442
- c.append([a[i][j] * b[j][i] for j in range(0, n)])
+ c.append([ sum([a[i][k] * b[k][j] for k in range(0, n)]) for j in range(0,n) ])
443
print("After matrix multiplication")
444
print("-" * 10 * n)
445
for x in c:
0 commit comments