title: Python, find element in PriorityQueue by value
body: <p>The priority queue PQ stores pairs </p>
  
  <pre><code>(weight, element),
  </code></pre>
  
  <p>sorted according to the weight. Does Python's implementation support the search operation in PQ by the element value (element in PQ or not)? </p>
  
  <pre><code>PQ = queue.PriorityQueue()
  PQ.put((1,2))
  PQ.put((5,6))
  val = 6
  print (val in PQ.queue)       #Nothing has been found
  </code></pre>
  
  <p>I suppose that items in PQ are stored in PQ.queue as tupples. </p>
  
  <p>Thanks for your help.</p>