- 博客(1)
- 收藏
- 关注
原创 学python的第一个小程序,删除TXT文件空格
import os f = open(’./1.txt’) lines = f.readlines() f.close() for line in lines: rs = line.rstrip(’\n’) newtxt = rs.replace(’ ‘,’’) newname = ‘1_1.txt’ if os.path.exists(newname): os.remove(newname) n...
2020-02-15 19:52:49
122
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人