from collections import defaultdict import sys loendur=defaultdict(lambda : 0) def uuri(rida1, rida2): m1=rida1.strip().split() m2=rida2.strip().split() if len(m1)!=len(m2): print(m1, m2) return for nr in range(len(m1)): if m1[nr]!=m2[nr]:loendur[m1[nr]+"_"+m2[nr]]+=1 f1=open(sys.argv[1], encoding="utf-8") f2=open(sys.argv[2], encoding="utf-8") sisu1=f1.readlines() sisu2=f2.readlines() if len(sisu1)!=len(sisu2): print("ridade arv erineb") exit() for reanr in range(len(sisu1)): uuri(sisu1[reanr], sisu2[reanr]) #print(loendur) votmed=list(loendur.keys()) votmed.sort() for voti in votmed: print(voti, loendur[voti])