Advertisement
rfmonk

queue_lifo.py

Jan 13th, 2014
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. import Queue
  5.  
  6. q = Queue.LifoQueue()
  7.  
  8. for i in range(5):
  9.     q.put(i)
  10.  
  11. while not q.empty():
  12.     print q.get(),
  13. print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement