Python - 071 : lambda or anonymous functions in python

Описание к видео Python - 071 : lambda or anonymous functions in python

A lambda function is a small anonymous function.

A lambda function can take any number of arguments, but can only have one expression.

Syntax
lambda arguments : expression
The expression is executed and the result is returned:

Add 10 to argument a, and return the result:

x = lambda a : a + 10
print(x(5))

Комментарии

Информация по комментариям в разработке