@b001

Yes, this video is slightly sarcastic. I would never use it to calculate 1+2. I used an extremely trival problem so that I could better demonstrate the syntax of lambda functions.

@heddevh

Can you make a tutorial for 1+3 next?

@aceplayer555

Lambda functions are just like regular functions, except they make your coworkers hate you.

@sirwonkyeye

I swear someday someone is going to figure out a Python one-liner that attains world peace but no one is going to use it because its "not easy to read"

@timilehinorawusi

Note : lambda has many use cases , but key places to use lambda are in amp and filter function please learn about map and filter and how to use lambda in them . Very useful !! 😊

@matiasalexannder

There is no way that you make me understand a concept that took me like 2 hours to parcially understand in just 30 seconds... thanks dude

@so_ma_music

WOAHHH thank you!! Just started learning Python recently and lambda definitely was a weird one to learn for me personally, but this all makes sense now 🙏

@coldenate

Dude, this is the best use case of short form content…. learning!? Brilliant 👏👏

@DTux5249

For those wondering: this is useful for functional programming where you might wanna use functions as input for other functions.

@hhill5489

Using lambdas along with map to perform fast operations on lists is what got me into them

@Freakward2011

“Gordon doesn’t need to here all of this he is a highly trained professional”

@AndrewMycol

I myself never really understood lambda functions, until I watched this video and it clearly explained it in a concise way with a rather simple example. Very good job!

@synsez

Thanks!

@Founder2721

song/theme/music name: escp , rain, book and cup of tea , i was once like you all too, trying to find it, please leave a comment if you found this helpful

@elgatorado4907

My professors teaching me Lambda as if I'm not going to just use regular functions anyway

@Mikequez-12

Also you can conver a function with arguments to an object. (Example):
def add(x,y):
    return x+y
print(add(1,2))
# 3
print(lambda:add(1,2))
# object element

@dzwoneczek9124

print(1 + 2) 🫡

@RFBPekopon

The lambda function is VERY useful with the CustomTKinter UI package. If you want to program a button, you provide a function reference, which means you can't input parameters. However, if you use lambda, you can pass "lambda: fuction(parameters)"!

@Zxv975

The core use of a lambda is explained in the video, but I'll just explain a bit further for anyone confused.

Functions are good programming practice because they group chunks of similar code (closure) and they allow for reuse by referring to the function's name later in the code. 

But what if you want the benefits of closure but you don't want to reuse a piece of code? You would then use an anonymous function which has no name and therefore can't be referred to elsewhere in the code. Lambdas are pythons version of anonymous functions.

@Dive_Into_Python

Never heard of such thing. Thanks for sharing it with us!