If I have a dictionary with their corresponding frequency values:
numbers = {a: 1, b: 4, c: 1, d: 3, e: 3}
To find the highest, what I know
The collections.Counter
object is useful for this as well. It gives you a .most_common()
method which will given you the keys and counts of all available values:
from collections import Counter
numbers = Counter({'a': 1, 'b': 0, 'c': 1, 'd': 3, 'e': 3})
values = list(numbers.values())
max_value = max(values)
count = values.count(max_value)
numbers.most_common(n=count)