Possible Duplicate:
join list of lists in python
Is there in Python a built-in or a particular syntax to accomplish the following on the fly?
def merge(listOfLists):
result = []
for l in listOfLists:
result.extend(l)
return result
print merge( [[1,2,3,4], [5,6], [7,8,9]] )
# [1, 2, 3, 4, 5, 6, 7, 8, 9]
Excuse me for lameness, but I really don't remember...