例如:
lambda x, y: x*x + y*y
如何调用lambda函数?
1、赋值
f = lambda str: len(str.split()) f('hello world')
2、
(lambda str: len(str.split()))('hello world')
3、
li = […] li.sort(key=lambda str: len(str.split()))
4、
def f(a, b, c): return lambda x: a*x**2 + b*x + c
标签:python,len,li,匿名,split,str,lambda From: https://www.cnblogs.com/daxiangcai/p/16784137.html