python sort dictionary by length value code example Example: python sort array of dictionary by value my_list = sorted(my_list, key=lambda k: k['name'])