filter(function, iterable)map(function, iterable)reduce(function, sequence) filter将 function依次作用于iterable的每个元素,如果返回值为true, 保留元素,否则从iterable里面删除.function必须返回是一个bool类型的函数.例如: def test(x): return (x > 3) filter(test, [1, 2, 3, 4, 5]) =====> [4, 5] map将…