The particular order you’ve mentioned is neither sorted alphabetically nor numerically (by month number).
In the dictionary you’ve constructed, the key is the name of the month, and value is the month number. So in order to sort the dictionary by month number i.e. by value (which is what I think you wanted?) you can do something like this
for month_name, month_num in sorted(dict.items() key = lambda x : x): print(month_name, end=' ')
solved Processing dictionary keys in sorted order [closed]