"Fangwen Lu" <[EMAIL PROTECTED]> wrote > I want to do some loops. Each loop will generate a tuple. Eventually > I want > to put tuples together in a higher level of tuple. Do you know how > to do > this?
Inaddition to other replies, you might be able to use a generator expression to do it in one line: >>> tuple( ( (x,x+1) for x in range(3) ) ) ((0, 1), (1, 2), (2, 3)) >>> HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor