python sort list of dictionaries alphabetically code example
Example 1: sort list of dictionaries by key python
newlist = sorted(list_to_be_sorted, key=lambda k: k['name'])
Example 2: python sort dictionary alphabetically by key
sortednames=sorted(dictUsers.keys(), key=lambda x:x.lower())