def enciklopedia(szocikkek): elsok = {} for cikk in szocikkek: if cikk[0] in elsok: if cikk < elsok[cikk[0]]: elsok[cikk[0]] = cikk else: elsok[cikk[0]] = cikk return elsok