Access elements from nested tuples

Georg Sauthoff g_sauthoff at web.de
Mon Sep 4 16:50:48 EDT 2006


Hi,

t = (1, (2, 3))

I am bit suprised, that I cannot access '3' via:
t[1].[1] # syntax error

But t[1].__getitem__(1) works like expected.

Why is that?

Regards
Georg Sauthoff



More information about the Python-list mailing list