*args
和**kwargs
到底是什么意思?
根据Python文档,从表面上看,它传递了一组参数.
def foo(hello, *args):
print hello
for each in args:
print each
if __name__ == '__main__':
foo("LOVE", ["lol", "lololol"])
这个打印出来:
LOVE
['lol', 'lololol']
您如何有效地使用它们?