SyntaxFix
Write A Post
Hire A Developer
Questions
The easiest way is to invert the value of the keys and use heapq. For example, turn 1000.0 into -1000.0 and 5.0 into -5.0.