📜  python 匿名函数多个参数 - Python 代码示例

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

代码示例1
def sum ( a, b ):            # non anonymous
        return a+b
print (sum(1, 2))            # 3

sum = lambda a,b: (a+b)        # anonymous / lambda
print (sum(1, 2))            # 3