http://www.cnblogs.com/linhaifeng/articles/6113086.html#_label7
参数组:**字典 *列表
def test(x,*args)
print(x)
print(args)
test(1,2,3,4,5,6)
结果:1
(2,3,4,5,6)
test(1,*['x','y','x'])
结果:1
['x','y','x']
http://www.cnblogs.com/linhaifeng/articles/6113086.html#_label7
参数组:**字典 *列表
def test(x,*args)
print(x)
print(args)
test(1,2,3,4,5,6)
结果:1
(2,3,4,5,6)
test(1,*['x','y','x'])
结果:1
['x','y','x']
本文标题:python之函数
本文链接:https://www.haomeiwen.com/subject/abhfoftx.html
网友评论