python刪除文件中指定內容

lines = [l for l in open("file.txt", "r") if l.find("20150723", 0, 8) != 0] fd = open("file.txt", "w") fd.writelines(lines) fd.close() 開頭是20150723的行刪除python
相關文章
相關標籤/搜索