from numpy import linalg
from numpy import matmul
M = [[2,1],[1,3]]
b = [[3],[-1]
Mb = []
nrows = 2
ncols = 2
for i in range(0,nrows):
sum = 0
for j in range(0,ncols):
sum = sum + M[i,j] * b[j]
Mb[?] = ?
print(Mb)
#the goal of this was to multiply matrices using a loop. I keep getting the error (python list indices must be integers not tuple) when trying to run this. I'm not sure what I need to put in place of the question marks inserted.