1 2 3 4 5
line="1,2,3\n4,5,6\n7,8,9" clean = line.replace(',','') words = clean.split(); for nums in words: print nums
1 2 3
123 456 789