2019年1月4日
摘要: 摘自《流畅的Python》 all 和 any 也是内置的归约函数。 all(iterable) 如果 iterable 的每个元素都是真值,返回 True;all([]) 返回 True。 any(iterable) 只要 iterable 中有元素是真值,就返回 True;any([]) 返回 阅读全文
posted @ 2019-01-04 14:16 hailuo 阅读(230) 评论(0) 推荐(0) 编辑