运维网's Archiver
论坛
›
Python
› python过滤文件
cmkzjw
发表于 2017-4-22 06:24:02
python过滤文件
#!/usr/bin/env python
filename=raw_input('Enter file name:')
f=open(filename,'r')
for eachLine in f:
if eachLine!='#':
print eachLine,
else:
continue
f.close()
原文地址:http://1986x.net/index.php/archives/52
页:
[1]
查看完整版本:
python过滤文件