949825667@qq.co 当前离线
上等兵
liss = [] dict1 = {} dict2 = {} f = open('y1.txt', 'r') liss = f.readlines() for i in range(len(liss)): if liss[i].split('----')[0] in dict1.keys(): if liss[i].split('----')[1] in dict2.keys(): pass else: dict2[liss[i].split('----')[1]]=1 print(liss[i]) else: dict1[liss[i].split('----')[0]]=1 dict2[liss[i].split('----')[1]] =1 print(liss[i])复制代码
评分人数
TOP
pcl_test 当前离线
荣誉版主
list = [] c = '-'*4 for line in open('y1.txt', 'r'): str = line.split(c) if not c.join(str[:2]) in list: list.append(c.join(str[:2])) print line复制代码
523066680 (消遣区)当前离线
版主