当前代码:
filepath = "C:/Bg_Log/KLBG04.txt"
with open(filepath) as fp:
lines = fp.read().splitlines()
with open(filepath, "w") as fp:
for line in lines:
print("KLBG04",line,line[18], file=fp)
输出:
KLBG04 20/01/03 08:09:13 G0001 G
需要灵活地移动列并使用数组或列表操作日期,如下所示
KLBG04 03/01/20 G0001 G 08:09:13
拉风的咖菲猫
catspeake
智慧大石
慕的地6264312
相关分类