Tuples ? How to ?

Simon Brunning SBrunning at trisystems.co.uk
Tue Apr 3 06:30:50 EDT 2001


> From:	Mickael ABBAS [SMTP:abbasmicNOSPAM at utc.fr]
> Just a question:
> How to make a imbricated tuple as, for example:
> ((1,10),(2,20),(3,30))
> when we don't know the size and we have only the two lists:
> [1,2,3] and
> [10,20,30]
> I tried with a loop (for...) but I obtain only something like that:
> (((1,10),(2,20)),(3,30))
 
Imbricated - now *that* is a cool word. Imbricate, v, arrange so as to
overlap like roof tiles.

Have you tried the zip() built-in function?

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.




More information about the Python-list mailing list