python 内置函数filter
class filter(object):
filter(function or None, iterable) --> filter object
Return an iterator yielding those items of iterable for which function(item)
is true. If function is None, return the items that are true.
filter(func,iterator)
func:自定义或匿名函数中所得值是布尔值,true