result = [[sum(a*b for a,b in zip(matrix1_row,matrix2_col)) for matrix2_col in zip(*matrix2)] for matrix1_row in matrix1]
outf = open("multimatrix.txt", "w")
outf.write(str(result)[1:-1])
outf.close()
this gives me [1750, 1029], [2252, 754] in the output file however I want it to look like this
1750 1029
2252 754
im guessing its because of the way i did the matrix multiplication however i couldnt get numpy to work in thonny
Here are 2 ways you can do this in python. First you can loop through your list of list and write each line to the file.
Second you can create the string you want to write using list comprehension and write it all at once.