+ 1

When do we use lambda function usually??

What is use actually

17th Dec 2019, 8:37 PM
Rhushabh Madurwar
Rhushabh Madurwar - avatar
1 Odpowiedź
0
Rather than making a separate (simple) function that you only need to use once... then you'd use a lambda. example:- def myfunct(a, b): return a + b ## this uses the function above print(list(map(myfunct, (10, 20, 30), (10, 20, 30)))) ## this uses a lambda print(list(map(lambda a, b: a + b, (10, 20, 30), (10, 20, 30))))
17th Dec 2019, 9:06 PM
rodwynnejones
rodwynnejones - avatar