accessing elements in multi-dimensional sequences

Duncan Booth me at privacy.net
Fri May 28 09:19:59 EDT 2004


Rodrigo Daunaravicius <rodelrod at hotmail.com> wrote in 
news:1epn0wa5bqb0r$.heo8w4umjuxm$.dlg at 40tude.net:

> I couldn't find in the docs what
> is the meaning of the asterisk in zip(*d), though. Nothing to do with C
> pointers, I guess? 

Python Reference Manual, section 5.3.4 Calls:

If the syntax "*expression" appears in the function call, "expression" must 
evaluate to a sequence. Elements from this sequence are treated as if they 
were additional positional arguments; if there are postional 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. 



More information about the Python-list mailing list