首页 > TAG信息列表 > heappush

python优先队列heapq

https://blog.csdn.net/weixin_39702559/article/details/110971925 #coding:gbk import heapq # 使用heapq实现优先队列 #定义一个可比较对象 class CompareAble: def __init__(self,priority,jobname): self.priority = priority self.jobname = jobname