标签:
s3=set() #s3=set(open(‘/home/work/ctt/20150409.uid.head‘,‘r‘).readlines()) file=open(‘/home/work/ctt/20150409.uid.head‘) for line in file.readlines(): line=line.strip(‘\n‘) # print line s3.add(line) print s3
s3.add(line) 而不是s3=set(line)
标签:
原文地址:http://my.oschina.net/u/1782622/blog/411048