I'm curious about the difference between lambda
function and a regular function (defined with def
) - in the python level. (I know what is the difference for programmers and when to use each one.)
>>> def a():
return 1
>>> b = lambda: 1
>>> a
<function a at 0x0000000004036F98>
>>> b
<function <lambda> at 0x0000000004031588>
As we can see - python knows that b
is a lambda
function and a
is a regular function. why is that? what is the difference between them to python?