Python 匿名函數

匿名函數 函數能夠像普通變量同樣進行賦值函數 def hello():    print('hello world') ​ print(hello.__name__) ​ a = hello ​ print(a.__name__) ​ hello() a() 函數能夠做爲參數傳遞,擴展函數的功能post def add(a, b):    return a+b ​ def calc(a, b, f
相關文章
相關標籤/搜索