首页 > 代码库 > Python Special Syntax 11: lambda表达式

Python Special Syntax 11: lambda表达式

lambdTesting=lambda x: x*3print(lambdTesting(5))输出 15

像C#一样传递lambda表达式:

def abc(t,a):    return t(a)print(abc(lambdTesting,15))

输出:
45