Tobiah <[EMAIL PROTECTED]> wrote:
> >>>> master,slave1,slave2=zip(*x)
> 
>  What does the asterisk do here?
> 
>  Thanks
>  ** Posted from http://www.teranews.com **

Instead of passing a single argument x to zip() you can think of it
unpacking the list x and passing len(x) arguments to zip.

So if x = [1,2,3,4]

zip(*x) == zip(1,2,3,4)

-- 
Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to