[Tutor] what is the * operator called in this context?

bill nieuwendorp slow67 at gmail.com
Mon Jul 30 00:25:59 CEST 2007


of course I take one more look through the docs after I send the origonal
message and stumble upon it right away.
http://www.python.org/doc/2.5/tut/node6.html#SECTION006740000000000000000


On 7/29/07, bill nieuwendorp <slow67 at gmail.com> wrote:
>
> when ever I need to use the struct module
> I always store my values in a list or a dict, then
> I do something like the code below
>
> import struct
> list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
> length =len(list)
> struct.pack(">%di"%(length), *[i for i in list])
>
> now I can not remember where I came up with that,
> I thought I read it in the python docs somewhere
> but I can not find any mention of it now.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070729/859225ca/attachment.htm 


More information about the Tutor mailing list