Implementing Priority Queue In Python