python sorted with dictionary code example
Example 1: python get dictionary keys sorted by value
sorted(A, key=A.get)
Example 2: python sorted dictionary multiple keys
mylist = sorted(mylist, key=itemgetter('name', 'age'))
mylist = sorted(mylist, key=lambda k: (k['name'].lower(), k['age']))
mylist = sorted(mylist, key=lambda k: (k['name'].lower(), -k['age']))