python list的兩種排序方法

python提供了對list排序兩種方法html 1.使用list內建函數sort排序 list.sort(key=None,reverse=False)python eg:web In [57]: l=[27,47,3,42,19,9] In [58]: l.sort() In [59]: l Out[59]: [3, 9, 19, 27, 42, 47] 上面這種是直接對l列表裏面的元素排
相關文章
相關標籤/搜索