$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #224

What goes in the blank?

# count how often each word appears
counts = ____(words)

Answer: Counter (also accepted: Counter, Counter(), collections.Counter)

collections.Counter tallies occurrences of each element in one pass.
Play Problem Solving ▸