def PrintMatrix(mat): l = 0 for i in mat: for j in i: print(j, end=' ') if (l <= (len(mat) - 2)): print(end="\n") l = l + 1