【python學習筆記】Python中*args 和**kwargs的用法

說明 python中默認缺省參數,參數名傳參,可變長度傳參。python 缺省參數 def foo(a,b=8): print a,b foo("leason") #leason 0 foo("leason",88) #def 88 參數名傳參數 def foo(a,b): print a,b foo("hello",'world') # helloworld foo(b=
相關文章
相關標籤/搜索