Re: [Tutor] Flattening multi-dimentional list
by Alan G other posts by this author
Sep 29 2005 12:26AM messages near this date
Re: [Tutor] Flattening multi-dimentional list
|
Re: [Tutor] Flattening multi-dimentional list
> I have this list wich is made of tuples. I wish I could "flatten"
> this list, that is, to extract each element in the tuples and
> build a new flat list with it.
Recursion is often used for this, there is an example
function in my tutorial topic on recursion (using nested
lists rather than tuples but it should work for either)
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Bernard Lebel
Pujo Aji
Kent Johnson
Alan G
Bernard Lebel
Danny Yoo
Bernard Lebel
|