from heapq import *heap=[]for i in range(10,1,-1): heappush(heap,i)print(heap)print(heappop(heap))print(heap)print(nlargest(3,heap))print(nsmallest(3,heap))fu_heap=[-x for x in heap]heapify(fu_heap)print(fu_heap)