f=open("123456.txt","r")
for s in f:
l=s.rsplit()
a= (l[0].ljust(30," ")+l[1].ljust(30," ")+l[2].ljust(30," ")+l[3].ljust(30," "))
#print(a)
file=open('147852.txt','a')
file.write(str(a)+'\n')
file.close
Matrix alignment in txt in columns
Guess you like
Origin blog.csdn.net/taochengwu123/article/details/99713910
Recommended
Ranking