I’m encountering this issue where I have a dict: map-x-to-y = {} and fill it with values such as map-x-to-y[some-string] = counter.
But afterwards, If i try to call sorted I keep on getting ‘list’ object not callable error.
I tried with OrderedDict and with sorted and none of this works. Also, I checked the type of map-x-to-y and it is ‘dict’.
My goal is to sort map-x-to-y in a descending order by value.