Skip to content

Instantly share code, notes, and snippets.

@a2chub
Created May 3, 2011 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a2chub/953835 to your computer and use it in GitHub Desktop.
Save a2chub/953835 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# encoding: utf-8
"""
queue_FIFO.py
Created by atusi on 2008-10-10.
Copyright (c) 2008 atusi.com. All rights reserved.
"""
from Queue import Queue
q = Queue()
q.put('first')
q.put(['second', '3rd'])
print q.get()
print 'queue size is', q.qsize()
print q.get()
[q.put(i)for i in range(5)]
print 'queue size is', q.qsize()
while not q.empty():
print q.get()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment