Dev Helpers
← Back

Find all ties at the highest recorded score

Find all ties at the highest recorded score using Python lists and dictionaries.

Open this example in the interactive library

Source code

scores = {'Ana': 8, 'Jo': 11, 'Kim': 11}
best = max(scores.values(), default=None)
print([name for name, score in scores.items() if score == best])

Sample output

['Jo', 'Kim']