with open('123.txt','r',encoding='gbk')as f:
lines = f.readlines()
ge = ['*','&']
new = ''
for line in lines:
mode = True
for i in ge:
if i in line:
mode = False
break
if mode:
new += line
with open('123.txt','w')as f:
f.write(new)
02-06
416
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-10
1656
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交