# Author: Sooele import queue q = queue.LifoQueue() q.put(1) q.put(2) q.put(3) print(q.get()) print(q.get()) print(q.get())
- class
queue.
Queue
(maxsize = 0 )#先入先出
- class
queue.
LifoQueue
(maxsize = 0 )#last in fisrt out - class
queue.
PriorityQueue
(maxsize = 0 )#存储数据时可设置优先级的队列