python 比较相同linux系统rp

2023-01-31 05:01:16 python linux 系统

import re

Setaliyun=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)

相关文章