We have created a defaultdict and added some elements there:
from collections import defaultdict
letters = defaultdict(int)
word = "mississippi"
for letter in word:
letters[letter] += 1
Match the element with the value you'll get from the letters. Note that one value is extra!