测试了一下。关于python 的函数def里面的传参数问题:
1、传参顺序:
# codig:utf-8 def function(a,b=1,*args,**kwargs): print(a,' ',b,' ',args,' ',kwargs) a=666 b=520 c= '你好' d = '小白' e = '小黑' f = {'name':'小李','age':18} function(a,b,c,d,e,f,g=11,h=5,i='大哥') def func(**kwargs): print(kwargs) func(a=1,b=2,c=5,d=9)