文件 逐行读写

#逐行读写
f = open('yesterday','r',encoding='utf-8')
f_new = open('yesterday3','w',encoding="utf-8")
for line in f:
if '等我享受' in line:
line = line.replace('等我享受','等lian享受')
f_new.write(line)
f.close()
f_new.close()
posted @   rongye  阅读(130)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示