标签:span ret div turn return pytho filter 判断 bsp
filter 函数,是用来过滤一个序列使用的。接收两个参数(函数, 序列)
例如判断是否为偶数
1 def num(a) 2 if a%2==0 3 return a 4 5 filter(num,1,2,3,4,5,6,7,8,910)
标签:span ret div turn return pytho filter 判断 bsp
原文地址:http://www.cnblogs.com/pxfb/p/6893437.html