What Are Python LAMBDA Functions and How to Use Them!

preview_player
Показать описание
A 'lambda' function in Python is a short, single-line function that returns a simple expression based on passed parameters, that does not require a formal function definition.

This makes it what is known as an 'anonymous' function, because it does not go through the standard Python process of defining the function, but it can still be stored in a variable and used throughout your code!

It is a useful python beginner trick to start writing simpler and easier to read code, but it also is not a good replacement for complex, multi-line functions!

Thanks for watching, be sure to leave a like and subscribe to the channel, and comment any questions you may have or what you'd like to see next on the channel! Cheers!
Рекомендации по теме
Комментарии
Автор

Embedding lambda inside a function was sneaky!

RisetotheEquation
Автор

I love how you explain, you're amazin! Congratulations!

Aturdiendo
Автор

I watched the first half of the video and I'm like, oh so lambdas are super dumb, and then I watched the second half and I'm like, woah this looks awesome
...idk why i felt the need to comment that

DataPotato
Автор

Anonymous functions with a fancy name😎
I see - the lambdas can hold a state, like a function object.

flioink
Автор

Hi sir, I learned some pygame techniques with your previous videos. Now, I am currently doing research about Machine Learning and AI stuffs. I would like to ask if you would have interest in making voice model from a pack of sound files? For example, I prepare 1000 lores of voice files and put it into the model and result out a voice model that can do the text to audio work.

TeriChyou
Автор

Complex but still useful I guess. Well now I am sort of familiar with it

willwillcode