So my question has been downvoted twice because the question is said to be a duplicate : Sort Counter by frequency, then alphabetically in Python
The answers here are speaking about ordering the Counter Dictionnary alphabetically. While what I want to order it in a ascending order
I want to do a order a list of strings by frequency. I get the frequency of each string in an descending order by default.
I did a letter_counts = Counter(list_of_string))
. I think I am getting a kind of dictionnary ordered in an descending order.
I want to sort them in an ascending order,** but i am not managing it so far.
I have read How do I sort a dictionary by value?, but cannot really apply it to a descending order.
frequency = Counter(list_of_string)
print(frequency)
The dictionary (is it?) I am getting is the following. As you can see it is already in a descending order
Counter({' stan ': 3,
' type ': 3,
' quora ': 3,
' pescaparian': 3,
' python remove even number from a list': 3,
' gmail': 3,
' split words from a string ': 3,
' split python ': 2,
' split ': 2,
' difference entre list et set': 2,
' add a key to a dictionnary python': 1,
' stackoverflowsearch python add lists': 1})