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
相关文章
相关标签/搜索