You can declare your function in such a way that it will
accept any number of positional parameters. To do this,
use an argument of the form “*” in your argument
list.
name
If you use this special argument, it must follow all the positional and keyword arguments in the list.
When the function is called, this name will be bound to a tuple containing any positional parameters that the caller supplied, over and above parameters that corresponded to other parameters.
Here is an example of such a function.
>>> def h(i, j=99, *extras): ... print i, j, extras ... >>> h(0) 0 99 () >>> h(1,2) 1 2 () >>> h(3,4,5,6,7,8,9) 3 4 (5, 6, 7, 8, 9) >>>