filter和map

filter

1. 执行了filter之后的结果集合一定<= 执行之前的个数

2. filter 只管筛选,不会改变原来的值

filter(function or None, iterable)

map

1. 执行前后元素个数不变

2. 值可能发生改变

map(func, *iterables) 
原文地址:https://www.cnblogs.com/Hxx0916/p/9561308.html