开发小学生

导航

2020年7月3日 #

python函数中的*与**

摘要: 1)*将函数参数打包成元组使用,传入参数为位置参数形式 >>> def test1(*arge): ... print(arge) ... >>> test1(1) (1,) >>> test(1,2,3,4) >>> def test2(x,*args): ... print(x) ... pri 阅读全文

posted @ 2020-07-03 09:59 开发小学生 阅读(364) 评论(0) 推荐(0) 编辑