sorted()函數 在Python2.x 和 Python3.x 中有所不一樣

sorted(iterable[,cmp,[,key[,reverse=True]]]) 做用:Return a new sorted list from the items in iterable.           第一個參數是一個iterable,返回值是一個對iterable中元素進行排序後的列表(list)。 可選的參數有三個,cmp、key和reverse。 1)cmp指定一個定製的
相關文章
相關標籤/搜索