Or, How to use variable length argument lists in Python. The special syntax, *args and **kwargs in function definitions is used to pass a variable number of arguments to a function. The single asterisk form (*args) is used to pass a non-keyworded, va
Python支持可变参数,通过*args和**kwargs来指定,示例如下: def test_kwargs(first, *args, **kwargs): print 'Required argument: ', first for v in args: print 'Optional argument (*args): ', v for k, v in kwargs.items(): print 'Optional argument %s (*kw