摘要: 内置函数:min 用法 源码 基础用法 key属性的使用 当key参数不为空时,就以key的函数对象为判断的标准。如果我们想找出一组数中绝对值最小的数,就可以配合lamda先进行处理,再找出最小值 高级技巧:找出字典中值最小的那组数据 如果有一组商品,其名称和价格都存在一个字典中,可以用下面的方法快 阅读全文
posted @ 2017-11-12 22:23 ZhuGaochao 阅读(2705) 评论(0) 推荐(0)
摘要: 四个带 key 参数的函数: max()点击查看详细 min()点击查看详细 map()点击查看详细 filter()点击查看详细 1)max(iterable, key) key:相当于对可迭代对象iterable每个元素的预处理。 2)min(iterable, key) 点击查看详细 3)ma 阅读全文
posted @ 2017-11-12 22:10 ZhuGaochao 阅读(5175) 评论(0) 推荐(0)
摘要: 内置函数——max Python max内置函数 max(iterable, *[, key, default]) max(arg1, arg2, *args[, key]) Return the largest item in an iterable or the largest of two o 阅读全文
posted @ 2017-11-12 22:02 ZhuGaochao 阅读(2359) 评论(0) 推荐(0)