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

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
主站蜘蛛池模板: 遵义县| 嘉鱼县| 确山县| 尚义县| 扎鲁特旗| 博乐市| 嘉峪关市| 黄骅市| 海兴县| 鄂温| 密云县| 奎屯市| 通城县| 民县| 南靖县| 根河市| 大埔区| 双江| 漳平市| 江华| 吉隆县| 即墨市| 额济纳旗| 曲麻莱县| 罗江县| 怀宁县| 长治县| 大荔县| 尤溪县| 怀来县| 武冈市| 探索| 龙门县| 濮阳市| 凌海市| 施秉县| 靖边县| 呼伦贝尔市| 扎赉特旗| 三亚市| 健康|