You are viewing a single comment's thread. Return to all comments →
It's super easy without any comparator thingy in Python
def comparator(a, b): if a.score > b.score: return -1 elif a.score < b.score: return 1 elif a.score == b.score: if a.name > b.name: return 1 elif a.name < b.name: return -1 else: return 0
Seems like cookies are disabled on this browser, please enable them to open this website
Sorting: Comparator
You are viewing a single comment's thread. Return to all comments →
It's super easy without any comparator thingy in Python