What is the difference in *args, **kwargs vs calling with tuple and dict? [duplicate]
问题 This question already has answers here : What does ** (double star/asterisk) and * (star/asterisk) do for parameters? (20 answers) Closed 3 years ago . This is a basic question. Is there a difference in doing def foo(*args, **kwargs): """standard function that accepts variable length.""" # do something foo(v1...vn, nv1=nv1...nvn=nvn) def foo(arg, kwargs): """convention, call with tuple and dict.""" # do something mytuple = (v1, ..vn) mydict = {nv1=nv1, ...nvn=nvn} foo(mytuple, mydict) I could