* in Python

Duncan Booth duncan.booth at invalid.invalid
Fri Jun 23 10:12:27 EDT 2006


Bruno Desthuilliers wrote:

>> so * basically means that args is a list
> 
> A tuple IIRC

In a function definition * means that any remaining position arguments will 
be passed in as a tuple. In a function call the * means that any sequence 
will be unpacked as positional arguments: it doesn't have to be a list or 
a tuple.



More information about the Python-list mailing list