(3, 6, 34)] # That's what I want
Thank you all
Frederic
- Original Message -
From: "Gerard Flanagan" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Sunday, August 27, 2006 2:59 PM
Subject: Re: unpaking sequences of unknown length
>
> Anth
Anthra Norell wrote:
> Hi,
>
>I keep working around a little problem with unpacking in cases in which I
> don't know how many elements I get. Consider this:
>
> def tabulate_lists (*arbitray_number_of_lists):
> table = zip (arbitray_number_of_lists)
> for record
>> Question: Is there an unpacking mechanism for cases in which I don't
>> know--and don't need to know--how many elements I get, or an
>> argument passing mechanism that is the inverse of the tuplifier (*args)?
>
> No.
>
> It looks a little bit as if you aren't aware of the symetry behind the *
>I keep working around a little problem with unpacking in cases in which I
> don't know how many elements I get. Consider this:
>
> def tabulate_lists (*arbitray_number_of_lists):
> table = zip (arbitray_number_of_lists)
> for record in table:
>#
Hi,
I keep working around a little problem with unpacking in cases in which I
don't know how many elements I get. Consider this:
def tabulate_lists (*arbitray_number_of_lists):
table = zip (arbitray_number_of_lists)
for record in table:
# etc ...