本帖最后由 ivor 于 2016-2-24 22:26 编辑
回复 1# yonglin 复制代码 - #!/usr/bin/env python
- # python 3.5.1
- # coding:utf-8
- wFile = open('new.txt', 'w')
- with open('old.txt', 'r') as file:
- for i in file:
- if not i.startswith('提示:'):
- print(i, end='', file=wFile)
-
- wFile.close()
复制代码
|