+ 6

What is lambda function in python

Python function

16th Oct 2019, 1:15 AM
Devi Kamaraj..šŸ˜‰
Devi Kamaraj..šŸ˜‰ - avatar
8 Answers
+ 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
ļ¼£ļ¼Øļ¼”ļ¼“ļ¼Øļ¼”ļ¼®
ļ¼£ļ¼Øļ¼”ļ¼“ļ¼Øļ¼”ļ¼® - avatar