title: Search an element in PriorityQueue in Python
body: <p>I have just started using PriorityQueue module in python from <strong>Queue</strong> module but i am having a hard time to check if an element exists in the PriorityQueue or not. Below is my Code snippet.</p>
  
  <pre><code>from queue import PriorityQueue
  q = PriorityQueue()
  q.put(3)
  q.put(2)
  q.put(1)
  ok = 4
  if ok in q:
      print("Found")
  </code></pre>
  
  <p>but i am getting the below error.</p>
  
  <p><strong>TypeError</strong>: argument of type 'PriorityQueue' is not iterable</p>
  
  <p>Please tell me how to iterate and check if an element is present in PriorityQueue module in python.</p>
  
  <p><strong>Doubt 2 :-</strong>
  In the above code snippet, PriorityQueue is <strong>MIN_HEAP</strong> by default, what syntax i should use i want a <strong>MAX_HEAP</strong>?</p>