Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7
Lambda takes any variable and creates a function with it. i.e. lambda x:x+1 This increases any x number by 1 and then returns to the callback scope. It's very used on functional programming, like when you use map, filter... But it isn't very pythonic, so it's not recommended. Learn it, but i recommend avoiding the use.
25th Jun 2019, 10:49 AM
Alexander Santos
Alexander Santos - avatar
+ 8
Lambdas are anonymous functions. They work by applying a function on given input. For example: ——————————— square = lambda x: x*x square(5) >>>25 square(6) >>>36 ———————————- You can read more about it in this question: https://www.sololearn.com/Discuss/1550638/?ref=app Hope this helps 😊
25th Jun 2019, 10:53 AM
aceisace
aceisace - avatar