These may help. Note that the analogy is to a variable number of arguments in other languages. This means that once you say you are going to use a variable number of arguments, all following arguments are part of that list (analogy to C or C++ use of varargs).
for example
f = [1,2,3,4,5]
def func(a, b, c, d)
print a, b, c, d
func(f) # Error 1 argument, 4 required
func(*f) # Error 5 arguments 4 required
http://www.python-course.eu/passing_arguments.php
Variable Length of Parameters
We will introduce now functions, which
can take an arbitrary number of arguments. Those who have some
programming background in C or C++ know this from the varargs feature
of these languages. The asterisk "*" is used in Python to define a
variable number of arguments. The asterisk character has to precede a
variable identifier in the parameter list.
>>> def varpafu(*x): print(x)
...
>>> varpafu()
()
>>> varpafu(34,"Do you like Python?", "Of course")
(34, 'Do you like Python?', 'Of course')
>>>
We learn from the previous example, that the arguments passed to the
function call of varpafu() are collected in a tuple, which can be
accessed as a "normal" variable x within the body of the function. If
the function is called without any arguments, the value of x is an
empty tuple.
Sometimes, it's necessary to use positional parameters followed by an
arbitrary number of parameters in a function definition. This is
possible, but the positional parameters always have to precede the
arbitrary parameters. In the following example, we have a positional
parameter "city", - the main location, - which always have to be
given, followed by an arbitrary number of other locations:
>>> def locations(city, *other_cities): print(city, other_cities)
...
>>> locations("Paris")
('Paris', ())
>>> locations("Paris", "Strasbourg", "Lyon", "Dijon", "Bordeaux", "Marseille")
('Paris', ('Strasbourg', 'Lyon', 'Dijon', 'Bordeaux', 'Marseille'))
>>>
http://docs.python.org/2.7/reference/expressions.html
If the syntax *expression appears in the function call, expression
must evaluate to an iterable. Elements from this iterable are treated
as if they were additional positional arguments; if there are
positional arguments x1, ..., xN, and expression evaluates to a
sequence y1, ..., yM, this is equivalent to a call with M+N positional
arguments x1, ..., xN, y1, ..., yM.
A consequence of this is that although the *expression syntax may
appear after some keyword arguments, it is processed before the
keyword arguments (and the **expression argument, if any – see below).
So:
>
>>> def f(a, b): ... print a, b ...
>>> f(b=1, *(2,)) 2 1
>>> f(a=1, *(2,)) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: f() got multiple values for keyword argument
'a'
>>> f(1, *(2,)) 1 2
It is unusual for both keyword arguments and the *expression syntax to
be used in the same call, so in practice this confusion does not
arise.
If the syntax **expression appears in the function call, expression
must evaluate to a mapping, the contents of which are treated as
additional keyword arguments. In the case of a keyword appearing in
both expression and as an explicit keyword argument, a TypeError
exception is raised.