This version and an equivalent full function do the exact same thing; this is just compressing it into one line. There's literally no advantage and it violates PEP-8 but some people seem to think it looks cool.
Basically lambda is just a plpaceholder for a variable which can also take more values/parameters. With those you can give them also functionalities. It is very similar to a basic function. But for flexing-reasons you will see many people using it here since you can finish most codes in just one line. But also you may need lambdas within functions for some tasks.
A lambda function in Python is a special kind of function that does not have a name. It is an anonymous function, which means you don't give it a name when you define it. It also has no parameters, and it always returns a single value.
The main difference between a classic function and a lambda function is that a classic function is named, while a lambda function is anonymous. This means that when you use a classic function, you can refer to it by name, and it is easier to read and understand. On the other hand, a lambda function is more concise and can sometimes be easier to write.
oh i see. Thanks for the info. I will read about it.
This version and an equivalent full function do the exact same thing; this is just compressing it into one line. There's literally no advantage and it violates PEP-8 but some people seem to think it looks cool.
This comment is hidden because it contains spoiler information about the solution
men i love using lambda ;)
Approved
python new test framework is required. updated in this fork
frrr
thanks everyone! now i understand a little bit more :-) i practice a little bit now 😉
every explication its very good, really thanks
Basically lambda is just a plpaceholder for a variable which can also take more values/parameters. With those you can give them also functionalities. It is very similar to a basic function. But for flexing-reasons you will see many people using it here since you can finish most codes in just one line. But also you may need lambdas within functions for some tasks.
I think that's not true.
A lambda function in Python is a special kind of function that does not have a name. It is an anonymous function, which means you don't give it a name when you define it. It also has no parameters, and it always returns a single value.
The main difference between a classic function and a lambda function is that a classic function is named, while a lambda function is anonymous. This means that when you use a classic function, you can refer to it by name, and it is easier to read and understand. On the other hand, a lambda function is more concise and can sometimes be easier to write.
i'm begining in python, i didn't undestand this ,
what is the difference between clasic fonction and lambda ?
i have looked documentation but i'm in a mist
I really should study that zip-thingy.
Or Python.
wOw, looks pretty
Loading more items...