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():
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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():