摘要: 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, 阅读全文
posted @ 2020-06-21 16:48 王毅2016 阅读(280) 评论(0) 推荐(0) 编辑