Python 函數參數

原文鏈接 按照位置傳參 func1(a, b): return a+b*2 test1 = func1(1,9) print(test1) 運行結果: 按照關鍵字傳參 def func2(a, b): return a+b*2 test2 = func2(b=9,a=1) print(test2) 運行結果: 默認參數 def func3(a, b, c = 3): r
相關文章
相關標籤/搜索