paopao00 2020-02-03
1.fun=lambda x:x+2
print(fun(10)) //输出结果为12
2.name=‘alex‘
func=lambda x:x.startswith(‘a‘)
print(func(name)) //输出结果为True
3.fun=lambda x,y,z:x+y+z
res=fun(1,2,3)
print(res) //输出结果为6
4.fun=lambda x,y,z:(x+1,y+1)
res=fun(1,2)
print(res) //输出结果为(2,3)
f = lambda x, y, z: x + y + z # returns a function that can optionally be assigned a name. def func: