- Python标准库--queue
- Python好的文章web-app-from-scratch-01
- Python代码片段
- Python读书--python cookbook day4
- Python框架相关--django admin路由系统源码剖析
- Python项目相关--将微信接收的文章自动解析同步到Bear
- Python之外--pure-bash-bible
python标准库 queue-- Thread-Safe FIFO Implementatio
- basic
import queue
q = queue.Queue()
for i in range(5):
q.put(i)
while not q.empty():
print(q.get(), end=' ')
print()
- LIFO Queue¶
import queue
q = queue.LifoQueue()
for i in range(5):
q.put(i)
while not q.empty():
print(q.get(), end=' ')
print()