[python 学习] lambda

#!/usr/bin/python
# -*- encoding:utf-8 -*-

# lambda parameter_list: expression
f = lambda x,y: x + y
print f(1,2) # 3

#等同与下面的函数定义
def g(x, y):
    return x + y
原文地址:https://www.cnblogs.com/natian-ws/p/7784182.html