python(队列 queue.LifoQueue后入后出)

# 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.Queuemaxsize = 0 )#先入先出
class  queue.LifoQueuemaxsize = 0 )#last in fisrt out 
class  queue.PriorityQueuemaxsize = 0 )#存储数据时可设置优先级的队列