📅  最后修改于: 2022-03-11 14:45:37.209000             🧑  作者: Mango
word_dict = { 'this': 11, 'at': 9, 'here': 5, 'why': 12, 'is': 2 }
# Sort Dictionary by value in descending order using lambda function
sorted_dict = dict( sorted(word_dict.items(),
key=lambda item: item[1],
reverse=True))
print('Sorted Dictionary: ')
print(sorted_dict)