from collections import Counter f=open("regiviisid.txt", encoding="utf-8") f.readline() m=[rida.split(",")[10] for rida in f.readlines()] print(m[:8]) c=Counter(m) for voti in c.keys(): if c[voti]>100: print(voti, " - ", c[voti])