带有这种参数的,实际传入参数时可以有多个,案例如下:
def helloPython(*args,**kwargs):
print ("non-key arguments are:")
for a in args:
print (a)
print ("key-value arguments are:")
for k,w in kwargs.items():
print (k+"="+w)
helloPython("I","know",whom = "you",what = "understand")
网友评论