def show_queue(q):
from queue import Queue
q = Queue()
for i in range(4):
q.put(i)
print(q.qsize()) # 4
print(q.empty()) # False
print(q.full()) # False
while not q.empty():
print(q.get(), end = ' ') # 0 1 2 3
from queue import LifoQueue
q = LifoQueue()
for i in range(4):
q.put(i)
while not q.empty():
print(q.get(), end = ' ') # 3 2 1 0
from queue import PriorityQueue
q = PriorityQueue()
q.put(1)
q.put(4)
q.put(2)
q.put(5)
while not q.empty():
print(q.get(), end = ' ') # 1 2 4 5