3/18/2014

Pyton study, Queue example source code

import queue

q = queue.Queue()
q.put("apple")
q.put("banana")
q.put(10)
print( q.qsize() )
print( q.get() )
print( q.get() )
print( q.qsize() )

"""
output is...

3
apple
banana
1

"""

No comments:

Post a Comment