In simple terms, a lambda is an expression of an anonymous function.
What is an anonymous function, which is usually used in situations where you need to define a function, but do not bother to name a function.
For example: The square of every element in a list: map (lambda x:x*x, [y for y in range (10)])
This approach is better than:
def SW (x):
Return x*x
Map (sw,[y for Y in range (10)]
is because the latter defines a function that wastes time and space.
An anonymous function is essentially a function, and he says that what is abstracted is a set of operations
A = [1,2,3], you will find that the right side of the equal sign is completely off the left side of the equals sign, and if you can get used to the thing on the right side of the equal sign, then the F = lambda x:x+1 alone is not hard to understand.
Now look at the map function again, and he can map a function to an enumerable type. Follow the previous function map (f, a)
The result becomes (2,3,4), and the F is applied to each element of a in turn.
When it comes to this type of wording, you'll find yourself able to do some sort of operation on each element of a list, as a map function from a loop, and then pass this operation as a parameter to the map with a lambda expression, thinking about things higher, There will be fewer details to filter on.