list.sort() and sorted() accept key argument to specify a function which returns what you would like your items sorted by: mylst.sort(key = lambda x: x[-1]) ...
確定! 回上一頁