DEV Community


Discussion on: Build a quick Summarizer with Python and NLTK

mishail98 profile image

I too am confused about this. According to my understanding, when we use the in operator in a dictionary, it only iterates through the keys. Therefore it would make sense that the program is printing only the first letter.

I guess to get the key-value pairs, we need to use the items() function as:
for wordValue in freqTable.items():

Forem Open with the Forem app