Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Sorted + key=lambda solution in Clear category for Frequency Sorting by vnkvstnk
def frequency_sorting(numbers):
return sorted(numbers, key=lambda x: (-numbers.count(x), x))
April 13, 2020