examples/lists/queue.py
from __future__ import print_function
from collections import deque

# items = deque([])
items = deque(['foo', 'bar'])

print(type(items))  # <type 'collections.deque'>
print(items)        # deque(['foo', 'bar'])

items.append('zorg')
print(items)        # deque(['foo', 'bar', 'zorg'])

items.append('zorg')
print(items)        # deque(['foo', 'bar', 'zorg', 'zorg'])

nxt = items.popleft()
print(nxt)          # 'foo'
print(items)        # deque(['bar', 'zorg', 'zorg'])