title: How to iterate over a Priority Queue?
body: <p>I'm trying to implement the <a href="http://en.wikipedia.org/wiki/Uniform-cost_search" rel="nofollow noreferrer">Uniform-cost search</a> in Python and for that, I need a priority queue, which I'm using <a href="https://docs.python.org/3.4/library/queue.html" rel="nofollow noreferrer">queue.py</a> from the standard library. However, the end of the algorithm checks if there is any path with a higher cost in the queue. How can I check if there is any given value in my queue if it's not iterable?</p>