You are viewing a single comment's thread. Return to all comments →
class Player: def __init__(self, name, score): self.name = name self.score = score def __repr__(self): pass def comparator(a, b): val = b.score - a.score if val == 0: return -1 if a.name < b.name else 1 return val
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 →