返回值数=0; 返回None
返回值数=1; 返回object
返回值数>1; 返回tuple
def test(x, y):
print(x)
print(y)
test(1, 2) //位置参数
test(y=1,x=2) //关键字参数
参数为参数组的:
def test(*args):
print(args)
test(1,2,3,4,5)
test(*[1,2,3,4])
关键字参数:
def test2(**kwargs):
print(kwargs)
test2(name='alex', age=9, sex='F')