摘要: 1. sort函数 sort函数为python内置的列表排序高阶函数,所谓高阶函数,也就是参数为函数或返回值为函数。 先看个简单的例子: # 数字列表的排序示例nums = [5, 2, 9, 1, 7] nums.sort()print(nums) # 输出:[1, 2, 5, 7, 9] 可以发 阅读全文
posted @ 2023-07-01 16:24 wancy 阅读(1012) 评论(0) 推荐(0) 编辑