EasyOutput prediction
defaultdict(int) for counting
What does this code print?
from collections import defaultdict
counts = defaultdict(int)
for ch in "aabbc":
counts[ch] += 1
print(dict(counts))← → arrow keys to navigate
Sign in to save your progress.