[Tutor] Tuples in tuples

Rick Pasotto rick@niof.net
Mon, 17 Sep 2001 11:23:56 -0400


On Mon, Sep 17, 2001 at 05:09:50PM +0200, Danny Kohn wrote:
> Hi.  Is it possible to reference tuple in tuple in one expression?
> Lets say I have a tuple t = ((6, 7, 8, 9, 0), (1, 2, 3, 4, 5)). Can I
> refer to the third element (8) in one expression or do I have to do
> something like x,y=t and then x[2]?

No problem.

t[0][2]

-- 
"The whole aim of practical politics is to keep the populace alarmed --
and thus clamorous to be led to safety -- by menacing it with an endless
series of hobgoblins, all of them imaginary." -- H.L. Mencken
		Rick Pasotto email: rickp@telocity.com
		               web: www.niof.net