For example I have a dictionary:
a = {'B': 2674, 'C': 2000, 'A': 2674}
and I need to sort it by the values in descending order. BUT, when the values are equal, then by key, alphabetically, ascending. Outputs a list with the keys.
b = sorted(a, key=lambda d: (d[1], d[0]))
Is there somehow a way to set the reverse separately?