# sorted + lamda 這邊文講得很清楚 https://ithelp.ithome.com.tw/articles/10218710 下面這句就是 在說我們要排序 然後用x list 的第二個col去比較, 然後x 是frequency.items() ```python= frequency = dict(sorted(frequency.items(), key=lambda x: x[1], reverse=True)) ``` 下面一個例子 ![](https://i.imgur.com/F2pot4X.png)