Python 官方文档:入门教程 => 点击学习
letter -> LadderScore0 -> LadderScore1 -
letter ->
LadderScore0 ->
LadderScore1 ->
LadderScore2 ->
LadderScore3 ->
LadderScore4 ->
LadderScore5 ->
LadderScore6 ->
LadderScore7 ->
LadderScore8 ->
LadderScore9 ->
WeeklyDoneCount0 ->
WeeklyDoneCount1 ->
WeeklyDoneCount2 ->
WeeklyDoneCount3 ->
WeeklyDoneCount4 ->
WeeklyDoneCount5 ->
WeeklyDoneCount6 ->
WeeklyDoneCount7 ->
WeeklyDoneCount8 ->
WeeklyDoneCount9 ->
LastFPS0 ->
LastFPS1 ->
LastFPS2 ->
LastFPS3 ->
LastFPS4 ->
LastFPS5 ->
LastFPS6 ->
LastFPS7 ->
LastFPS8 ->
LastFPS9 ->
脚本内容如下
#!/usr/bin/env python
#coding:utf-8
import os
fORMat = '%-*s%-*s\n'
file = open('a.txt','r')
f = open('file.txt','a')
all = ""
for i in file:
i=i.split(' ')
a = format % (20, i[0], 20, '->')
all += a
f.write(a)
f.close()
file.close()
print all
文件展示
--结束END--
本文标题: Python修改文本列对齐
本文链接: https://lsjlt.com/news/182761.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0