DEV Community

loading...

Discussion on: Build a quick Summarizer with Python and NLTK

Collapse
mishail98 profile image
Mishail98

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