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

What goes in the blank?

# returns the most common element in items
from collections import Counter
def most_common(items):
    return Counter(items).most_common(1)[0][____]
# most_common([1,1,2]) -> 1

Answer: 0 (also accepted: 0)

most_common returns (value, count) tuples, so index 0 is the value.
Play Problem Solving ▸