from collections import Counter f=open("regiviisid.txt", encoding="utf-8") f.readline() m=["-".join(rida.split(",")[10:12]) for rida in f.readlines()] print(m[:8]) c=Counter(m) for voti in c.keys(): if c[voti]>100: print(voti, " - ", c[voti]) #Leidke levinumad alguskolmikud #Leidke levinumad algusnoodid viisides, mille tugiheli (tulp nr 6) on g