创建函数参数定义顺序
eg:stu(name,age,*args,hobby="没有",**kwargs):
调用 stu(name,age,"正正","静静",hobby="swimming",hobby2="篮球",hobby3="玩")
stu(普通参数,收集参数tuple,关键字参数,收集参数dict)
## 如果几个参数都存在,则不能改变顺序
eg:stu(name,age,*args,hobby="没有",**kwargs):
调用 stu(name,age,"正正","静静",hobby="swimming",hobby2="篮球",hobby3="玩")
stu(普通参数,收集参数tuple,关键字参数,收集参数dict)
## 如果几个参数都存在,则不能改变顺序
本文标题:2019-01-14
本文链接:https://www.haomeiwen.com/subject/qeyddqtx.html
网友评论