标签:python
import reSetaliyun=set(‘‘)
Setczgame=set(‘‘)
with open(‘alirpm.txt‘,‘r‘) as f:
for line in f:
Result=re.subn(‘-\d.*‘,‘‘,line)[0]
Setaliyun.add(Result)
#print(Setaliyun)
with open(‘gamerpm.txt‘,‘r‘) as f:
for line in f:
Result=re.subn(‘-\d.*‘,‘‘,line)[0]
Setczgame.add(Result)
#print(Setczgame)
#print(Setaliyun-Setczgame)
print(Setczgame-Setaliyun)
标签:python
原文地址:http://blog.51cto.com/sjitwant/2091213