title: How to write integer values to a file using out.write()?
body: <p>I am generating some numbers (let's say, <code>num</code>) and writing the numbers to an output file using <code>outf.write(num).</code></p>
  <p>But the interpreter is throwing an error:</p>
  <pre class="lang-none prettyprint-override"><code>    outf.write(num)  
  TypeError: argument 1 must be string or read-only character buffer, not int.  
  </code></pre>
  <p>How can I solve this problem?</p>