sorting dictionaries by a key value in python code example Example: python get dictionary keys sorted by value sorted(A, key=A.get)