Priority Queue In Python Code