*args表示可以传进多个参数
def add_number(a,*args):
for i in args:
a += i
return a
a = add_number(1,2,3)
print (a)
output:
6
**kwargs表示可以传进多个键值对
def add_number2(a,**kwargs):
for arg,value in kwargs.items():
print (arg,value)
add_number2(1,x=2,y=3)
output:
x 2
y 3