Python: writing a data file with three columns of integers
<p>The code I am working with is: </p>

<pre><code>fout = open('expenses.0.col', 'w')  
for line in lines:
  words = line.split()
  amount = amountPaid(words)
  num = nameMonth(words)
  day = numberDay(words)
  line1 = amount, num, day
  fout.write(line1)
fout.close()
</code></pre>

<p>There is a file that you cannot see that the line in lines is pulling from which runs just fine. There are 100 lines within lines. When writing this last bit of code the goal is to get 100 lines of three columns which consist of the values: amount, num, and day. All three of these values are integers.</p>

<p>I have seen similar questions asked such as <a href="http://stackoverflow.com/questions/10420931/pythonwriting-a-data-file-using-numbers-1-10">[python]Writing a data file using numbers 1-10</a>, and I get the same error as that example. My problem is applying dataFile.write("%s\n" % line) to my case with three numbers in each line. Should be a quick 1 line of code fix.</p>
