删除txt文件内容

删除txt文件里的 聊天记录的时间那一行

f = open("d:\面试.txt", "r")
g = open("d:\英雄联盟ADC技巧.txt", "w")
for line in f.readlines():
    if "21:" not in line:
        g.write(line)
f.close()
g.close()
原文地址:https://www.cnblogs.com/bingxing/p/7392996.html