PYTHON CODING
- waclaw_koscielniak
- Sep 6
- 1 min read
import heapq
nums = [5, 1, 8, 3]
heapq.heapify(nums)
heapq.heappush(nums, 0)
print(heapq.heappop(nums), nums[0])
[Running] python3 -u "/Users/name/test/test83.py"
0 1
[Done] exited with code=0 in 0.059 seconds

Could you try to run it yourself?