Python's Lambdas Explained In LESS Than 60 Seconds

preview_player
Показать описание
Python's lambdas explained is less than 60 seconds. #Python #Code #Shorts
Рекомендации по теме
Комментарии
Автор

Lambdas should not be assigned to a variable.(according to pep-8) Instead, they should be defined as functions. The primary reason for this is debugging. Lambdas show as <lambda> in tracebacks, where functions will display the function's name.

xzex
Автор

they are nameless functions and they should not be assigned a name, in this case def add(a, b):return a+b is beter (pep 8)

xzex
Автор

I learned a true potential of lambda when working with Tkinter

superspies
Автор

still no frickin idea what a lambda is.

jefferylegere
Автор

lambda parameter (space available to put arguments): expression (e.g.: math formula, hence calculator). I'm beginner, it would confuse beginners when different terminology is used.

anthonyk
Автор

When u assign a lambda to a variable, the variable contains the address to the lambda function object which is callable with the lambda's parameter list!

sammyiyi
Автор

Why sorted don't sorted the words alone ? what it need a lambda function in it ?

Fine_Mouche
Автор

Instead of add(5, 10), you can also just do 5 + 10

PhilippLackner
Автор

The only thing needed to understand whats lambda is to need k ot its, using for creating func, but if u ront want to create func u just create lambda, and its anonymous func

bloxfruit_player
Автор

So, it's like an arrow function ? Or is there any difference?

gramps
Автор

Code golfing without lamba is like treasurehunting without map. I need them both.

RexVelde
Автор

i still can't understand the point of using it

gamingland
Автор

POV: you were tired of changing the file name to py + current month (pyjan, pyfeb, pydec) so you put it at indently

realcontentgamer