Why Python's Collection Counter sort like this? : I was trying to sort few values in list using Python's Counter from collection module. But it gives weird result when 

    >>> diff=["aaa","aa","a"]
    >>> c=Counter(diff)
    >>> sorted(c.items(), key = lambda x:x[1] , reverse=True)
    [('aa', 1), ('a', 1), ('aaa', 1)]
    >>> c.items()
    [('aa', 1), ('a', 1), ('aaa', 1)]

Output is strange, as it seems to have shuffle 'aa' to the first place, then 'a' and 'aaa' at last. 
Ideally, it should have been 'a' then 'aa' then 'aaa'

What is the reason behind this and how would you rectify the same