Python anonymous functions, map(), reduce(), filter()
Anonymous function: simplify function definition
1. Format :
lambda x, y: operation
2. Anonymous function as a parameter
3. map()
2 parameters, 1 is a function, 1 is Iterable.
The map applies the incoming parameters to each element of the sequence in turn, and returns the result as a new Iterator .
4、reduce()
Act on two numbers 5 and 3 at a time, do cumulative operation
5, filter()