Mississippi

Report a typo

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!

Match the items from left and right columns
s
m
p
j
4
2
None
0
1
___

Create a free account to access the full topic