+ 6

What is lambda function in python

Python function

16th Oct 2019, 1:15 AM
Devi Kamaraj..😉
Devi Kamaraj..😉 - avatar
8 odpowiedzi
+ 3
Thanks u007👍
16th Oct 2019, 1:25 AM
Devi Kamaraj..😉
Devi Kamaraj..😉 - avatar
+ 3
Can you define it with one more example...which the simplest..
16th Oct 2019, 11:29 AM
Devi Kamaraj..😉
Devi Kamaraj..😉 - avatar
+ 3
Can't anyone explain me this: def zone (num) return lamda x:(x*num) result=zone(10) Print (result (90)) The output is 90..
16th Oct 2019, 11:45 AM
Devi Kamaraj..😉
Devi Kamaraj..😉 - avatar
+ 2
The following site explains lambda functions in python: https://stackabuse.com/lambda-functions-in-python/ The term “lambda” comes from the field of lambda calculus.
16th Oct 2019, 1:24 AM
u007
u007 - avatar
+ 1
def add1(a,b): return a+b add2=lambda a,b: a+b #similar but lambda is oneliner
16th Oct 2019, 8:54 AM
Sousou
Sousou - avatar
0
its anonymous function, soninject functions when needed without having to declare a named function. arror functions fill this role in Javascript
16th Oct 2019, 3:16 AM
Alex Merced
Alex Merced - avatar
0
You’re definining a function that takes one input and returns a new function that takes a single input and multiplies it by the number input to the first function. Then, you are passing the number 10 to the function and assigning the output function to the variable ‘result’. Next, you pass the number 90 to the resulting function and print it. The answer should be 900 if you get rid of all the syntax errors in your code.
16th Oct 2019, 10:20 PM
Rora
0
Lambda is simple inline function like in c++ pls watch my video for more clarification https://youtu.be/4F4puFjktZU
9th Nov 2019, 12:33 PM
CHATHAN
CHATHAN - avatar