📜  lambda python - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:50.132000             🧑  作者: Mango

代码示例6
# Lambda is what is known as an anonymous function. Basically it's like a function but a variable

# This is the "python" way of writing a lambda function

multiply = lambda x,y: x * y 
# The x,y are the arguments used for the function and "x * y" is the expression

multiply(10, 10) #100

# Lambda are useful sometimes for a number of python projects.