[Tutor] Canonical

Simon Brunning SBrunning@trisystems.co.uk
Thu, 7 Dec 2000 09:14:56 -0000


> From:	Rael Dornfest [SMTP:rael@oreilly.com]
> I have a tuple of tuples (specifically, a tuple of rows from a database).
> 
>   ( ('a', 'b'), ('1', '2'), ... )
> 
> I want to manipulate the 2nd element in each 2nd level tuple (ie. 'b',
> '2', and so on).
 
Try something like:

for firstval, secondval in mytuple:
    print secondval

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning@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.