17
What is the output of the following code?
import heapq
h = []
for x in [5, 1, 8, 3, 2]:
heapq.heappush(h, x)
print([heapq.heappop(h) for _ in range(3)])Easy