def test(x,z,y=100): # 函数定义时,默认参数放在最后 return x + y + z#print(test(100,2)) # SyntaxError: non-default argument follows default argument 非默认参数不能跟随默认参数后print(test(x=100,z=100))print(test(100,200))
函数1
原文:https://www.cnblogs.com/chris-jia/p/9480677.html