Priority Queue Implementation In Python Using A Dictionary