python怎么将列表排序
发布时间:2021-03-15 编辑:jiaochengji.com
教程集为您提供python怎么将列表排序等资源,欢迎您收藏本站,我们将为您提供最新的python怎么将列表排序资源
python将列表排序的方法:
python有个内置的sort函数可以对列表实现排序。使用“列表.sort(reverse=True)语句就可以对列表进行降序排序了
示例代码如下:
a = [123, 55, 31, 65, 84, 99, 87, 546] a.sort(reverse=True) print(a)
执行结果如下:
更多Python知识,请关注:Python自学网!!
您可能感兴趣的文章:
python怎么将列表排序
python的sorted怎么用
python中列表怎么排序
python 8个常用内置函数解说
python怎么升序和降序排序
python中怎样将字典排序
javascript排序算法代码解析
python如何给数字排序
python中sorted是什么
python sort函数怎么用
上一篇:python怎么关闭指定的excel
下一篇:python怎么在win运行
[关闭]