Python sort() & sorted()
Python sort() & sorted()
sort()-只对列表排序
https://www.runoob.com/python/att-list-sort.html
list.sort(cmp=None, key=None, reverse=False)
cmp=可选参数;key=排序内容;reverse=False 升序默认/ = True 降序
>>> i="shdudibf"
>>>s=list(i)
>>> s
['s',
原创
2020-08-16 17:30:54 ·
125 阅读 ·
0 评论