for i in range(len(toSort)):
    _ranks.append({})
for i in range(len(toSort) - 1):
    for k, v in toSort.items():
        for a, b in v.items():
            pass
How can I get a ranked list from a dictionary?