5
I need to know how to get the ten most frequent words.
This code takes all the words of a text and saves how many times it occurred.
if len(palavra) > 0:
   if palavra in conjunto:
     qtd = conjunto[palavra]
     qtd += 1
     conjunto[palavra] = qtd
  else:
     conjunto[palavra]
How do I return only the 10 most frequent occurrences?