Created
May 3, 2011 17:54
-
-
Save a2chub/953835 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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