I need to make a function but do not know how. It is a part of a class matrix if that is important. I have a part code and what it needs to print out but I do not know how to make the function, can anyone help me.
This is the current code
m1 = Matrix()
m1.set_matrix( [[1,2,3,4],[5,6,7,8],[9,8,7,6]] )
print(m1)
This is the current output
[ 1 2 3 4 ][ 5 6 7 8 ][ 9 8 7 6 ]
but it needs to be in rows and columns, the matrix is supposed to be 3x4.