def PrintMatrix(mat): for i in range(len(mat)): for j in range (len(mat[i])): print ( "{:2d}".format(mat[i][j]), end = "") print ()