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