sort 與 sorted 差別 sort 是應用在 list 上的方法,sorted 可以對所有可疊代的對象進行排序操作。 list 的 sort 方法傳回的是對已經存在的清單進行操作。 内建函數 sorted 方法傳回的是一個新的 list,而不是在原來的基礎上進行的操作。