* in Python
Bruno Desthuilliers
onurb at xiludom.gro
Fri Jun 23 10:44:10 EDT 2006
Duncan Booth wrote:
> 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.
yes, of course - I only saw it from the function's POV.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list