Possible Duplicate:
How do you split a list into evenly sized chunks in Python?
Merge two lists in python?
Original data in array:
a = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
Desired output:
['1 2 3', '4 5 6', '7 8 9']
I know using the while
statement is inefficient, so I need help in this.