Map, Filter and Reduce

http://book.pythontips.com/en/latest/map_filter.html

 

Record wave: in particular, the list contains more True False, the

1) may be all, any do -> determines whether the list are True

2) can also be used to do reduce

 

reduce( (lambda x, y: x&y) ,[True, False, False])
False
all([True, False, False])
False
any([True, False, False])
True

 

 

 

Guess you like

Origin blog.csdn.net/sinat_15355869/article/details/92585427