title: How to write integers to a file
body: <p>I need to write </p>
  
  <pre><code>ranks[a], ranks[b], count
  </code></pre>
  
  <p>to a file, each time on a new line</p>
  
  <p>I am using:</p>
  
  <pre><code>file = open("matrix.txt", "w")
  for (a, b), count in counts.iteritems():
      file.write(ranks[a], ranks[b], count)
  
  file.close()
  </code></pre>
  
  <p>but this is not working and returns</p>
  
  <pre><code>TypeError: function takes exactly 1 argument (3 given)
  </code></pre>