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

What goes in the blank?

# always pop the smallest item first
smallest = heapq.____(heap)

Answer: heappop (also accepted: heappop, heappop())

heapq.heappop() removes the smallest element of a min-heap.
Play Problem Solving ▸