human
Finding The Biggest Key In A Python Dictionary
assistant
Here is some code to get a list of keys of dictionary `things` sorted by the value of nested dictionary key 'weight'

sorted(list(things.keys()), key=lambda x: things[x]['weight'], reverse=True)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.