are dictionary values sorted by key in python code example
Example 1: python get dictionary keys sorted by value
sorted(A, key=A.get)
Example 2: sorting-a-dictionary-by-value-then-by-key
{12:2, 9:1, 14:2}
{100:1, 90:4, 99:3, 92:1, 101:1}
sorted(A, key=A.get)
{12:2, 9:1, 14:2}
{100:1, 90:4, 99:3, 92:1, 101:1}