Take the 2-minute tour ×  Possible Duplicate: join list of lists
in python Flatten (an irregular) list of lists in Python How can
I flatten lists without splitting strings?  I have a list-tuple-
list tree and I'd like to flatten it for a query, so that I can
print all the items of the the first lists of each tuple.  I can
do it via a for loop  bigNest =
[([item1,item2],[]),([item3],[item4])] mergedlist = [] for
listItem in bigNest:    mergedlist += listItem[0] print
mergedList  I'm wondering if there's a simpler/quicker way which
will also work with larger tuples.  share|improve this question
Have you done a search for "flatten"? This has been answered 100
times. –  Mark Ransom Nov 30 '12 at 17:45 There are a lot of
different ways to do, as discussed in the previous answers
(which is why I'm voting to close). There's terse but slow
(sum(nested_list, [])) or the various itertools-based solutions
(e.g. itertools.chain) which will scale up considerably better.
–  Joe Kington Nov 30 '12 at 17:50 I did actually sea