def foo(args1,argst):
print(args1)
print(argst)
foo("hello","if","you","love")
hello
if you love
*argst是一个长短可变的参数,用元组表示
def f():
return 1,2,3
f()
(1, 2, 3)
def foo(args1,argst):
print(args1)
print(argst)
foo("hello","if","you","love")
hello
if you love
def f():
return 1,2,3
f()
(1, 2, 3)
本文标题:2019-01-26元组
本文链接:https://www.haomeiwen.com/subject/mvaijqtx.html
网友评论