heapq.heappop(heap)
Pop and return the smallest item from the heap, maintaining the heap invariant. If the heap is empty, IndexError
is raised. To access the smallest item without popping it, use heap[0]
.
heapq.heappop(heap)
Pop and return the smallest item from the heap, maintaining the heap invariant. If the heap is empty, IndexError
is raised. To access the smallest item without popping it, use heap[0]
.
Designed by : w10schools
service@w10schools.com
Please login to continue.