python lambda 用途

可以让一个带参数函数,传递并以无参调用

 1 def test(a):
 2     print a
 3     
 4     
 5 a=test
 6 #
 7 #a()
 8 a=897987
 9 
10 fun=lambda : test(a)
11 
12 fun()
原文地址:https://www.cnblogs.com/aveenzhou/p/3809583.html