Possible Duplicate:
Flattening a shallow list in Python
I want to create a function that takes a 2 dimensional list and outputs a 1 dimensional list with the same contents. Here is what I have:
twoDlist= [[23, 34, 67],[44,5,3],[7,8,9]]
def twoone (list1):
for x in range (len(list1)):
for y in range(len(list1)):
list2=[]
list2.append(list1[x][y])
print twoone(twoDlist)
Only problem it returns 'None'. What am I doing wrong here? Can someone suggest a better idea?