n-dimensional matrix multiplication python <p>I'm doing a program in Python that multiplies two matrices of the dimension that the user enters. The problem I have is that the user must enter the values ​​for each line in the input and my program can only obtain a value for each input. I've tried using .split () but when it does the multiplication sends me this error:</p> <blockquote> <p>TypeError : can not multiply sequence by non -int of type 'list'.</p> </blockquote> <p>My code is:</p> <pre><code>matriza=[] matrizb=[] matrizc=[] orden=int(input("Ingresa el orden de las matrices: ")) #Para obtener la primer matriz for i in range(0,orden): matriza.append([0]*orden) for j in range(0,orden): matrizb.append([0]*orden) for k in range(0,orden): matrizc.append([0]*orden) for i in range(0,orden): for j in range(0,orden): matriza[i][j]=int(input("entrada renglon para la primer matriz")) print "La primer matriz que introdujiste fue:" "\n" ,matriza, "\n" #Para obtener la segunda matriz for i in range(0,orden): for j in range(0,orden): matrizb[i][j]=int(input("entrada renglon para la segunda matriz")) print "La segunda matriz que introdujiste fue:" "\n" ,matrizb, "\n" #Para la multiplicación de las dos matrices for i in range(0,orden): for j in range(0,orden): for k in range(0,orden): matrizc[i][j]+=matriza[i][k]*matrizb[k][j] print "La matriz que resulta de multiplicar las matrices que introdujiste es:" "\n" ,matrizc </code></pre>