def PrintMatrix(mat): for i in mat: for j in i: print(j, end=" ") print()