标签:python
#encoding:utf-8 obuff = [] repeat = 0 path = raw_input(‘please input your path: ‘) for ln in open(path): if ln in obuff: repeat+=1 continue obuff.append(ln) print "repeat columns is %s" %repeat with open(path, ‘w‘) as handle: handle.writelines(obuff)
本文出自 “安全” 博客,请务必保留此出处http://wushang.blog.51cto.com/10078847/1700263
标签:python
原文地址:http://wushang.blog.51cto.com/10078847/1700263