Find the indexing error in this matrix-vector product.
Codepython
def matvec(M, v):
result = []
for i in range(len(M)):
s = 0
for j in range(len(M[i])):
s += M[i][j] * v[i]
result.append(s)
return result
print(matvec([[1, 2], [3, 4]], [5, 6])) # expected [17, 39]
What is the bug in this matrix-vector multiplication?