+ 2
What's the difference if we used lambda or polynomial?
Output will be same in both cases then what is the main use of function lambda.
2 Respostas
+ 4
The use of lambda function is that we can define a function and call it in a single line.
For example:
def square(n):
return n**2
print(square(5))
print((lambda x : x**2) (5))
Here the two functions does the same thing. But lambda function makes it simple....
+ 1
The lambda function is a single use non addressed function. This kind of function is used in the Functional Paradigm to create a complicated function that unique to an instance and will not be used again. This saves space and improves execution in Interpreted Languages, like Haskell, BCPL and Python.
Remember : Python is not a pure Object Oriented Language, it is Multi-Paradigm Language.