# conding:utf8
# *args 代表可以输入多个参数
def test(*args):
return args
# *loc 解包,解元祖的包, list不能解包,list的值使用循环取值
def main(loc):
print(*loc)
# **kwargs 代表输入多个键值对参数
def func(**kwargs):
return kwargs
s = test('hello', 'world', ['xiao', 'ming'])
print(s)
# ('hello', 'world', ['xiao', 'ming'])
main(s)
# hello world ['xiao', 'ming'] 解包,解元祖的包, list不能解包,list的值使用循环取值
f = func(test='xiaoming')
print(f)
# {'test': 'xiaoming'}