官术网_书友最值得收藏!

The queue module

The queue module in Python provides a simple implementation of the queue data structure. Each queue in the queue.Queue class can hold a specific amount of element, and can have the following methods as its high-level API:

  • get(): This method returns the next element of the calling queue object and removes it from the queue object
  • put(): This method adds a new element to the calling queue object
  • qsize(): This method returns the number of current elements in the calling queue object (that is, its size)
  • empty(): This method returns a Boolean, indicating whether the calling queue object is empty
  • full(): This method returns a Boolean, indicating whether the calling queue object is full
主站蜘蛛池模板: 沂南县| 吉林市| 商都县| 华坪县| 府谷县| 苏尼特左旗| 项城市| 郁南县| 栾川县| 团风县| 安溪县| 嵊泗县| 夏津县| 裕民县| 丽水市| 南岸区| 慈溪市| 门头沟区| 合阳县| 内乡县| 牙克石市| 邵阳县| 通道| 嘉黎县| 三明市| 白银市| 当阳市| 宁晋县| 樟树市| 民县| 武隆县| 永昌县| 离岛区| 额济纳旗| 英超| 绥滨县| 贵溪市| 平果县| 洛阳市| 九龙城区| 文化|