Python 特殊语法:filter、map、reduce、lambda

Python内置了一些特殊函数,这些函数很具python特性。可让代码更加简洁。html 能够看例子:python 1 filter(function, sequence):函数 str = ['a', 'b','c', 'd']post def fun1(s): return s if s != 'a' else Noneui ret = filter(fun1, str)htm print r
相关文章
相关标签/搜索