0003python中的可变参数

时间:2022-04-24 08:59:37

>>>def foo(x,y,z,*args,**kargs):

print x

print y

print z

print args

print kargs

>>> foo(1,2,3,4,5,name="qiwsir",age=37)

1 2 3 (4, 5) {'name': 'qiwsir','age':37}