Priority queue

Why a loop that only executes once?  If you need to check i's value, you can just do "if i > 0:"