ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] Flattening multi-dimentional list
by Bernard Lebel other posts by this author
Sep 29 2005 6:10AM messages near this date
Re: [Tutor] Flattening multi-dimentional list | Re: [Tutor] Flattening multi-dimentional list
Thanks for the examples and references everyone.

I should clarify though that I was simply looking for a *built-in*
feature rather than a function or a list-comprehension. I know these
last two works and I currently use a list comprehension.

# Example:
> >> flatten( [ 1, 3, 4, ('allo', 'bonjour', 'salut' ), 34, False,
False, ( 3, ) ]
[ 1, 3, 4, 'allo', 'bonjour', 'salut' , 34, False, False, 3 ]


Cheers!
Bernard
_______________________________________________
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved