python(filter专题提供python(filter的最新资讯内容,帮你更好的了解python(filter。
1. filter str = ['a', 'b', 'c', 'd'] def fun1(s): return s if s != 'a' else None ret = fileter(func, str) print ret 2. map str = ['a', 'b', 'c', 'd'] def func2(s): return s + '.txt' ret = map(fun2, str) print ret 3. reduce def adda(x, y): return x + y print reduce(ass1 ,range(1, 100)) print reduc...