title: Python - How to add a space string (' ') to the end of every line in a text/conf file
body: <p>I have a config file that i would like to add a space (' ') to the end of every line in the file</p>
  
  <p><strong>File example:</strong></p>
  
  <pre><code>#xxx configuration
  IPaddr = 1.1.1.1&lt;add a space here&gt;
  host = a.b.c.d&lt;add a space here&gt;
  usrname = aaa&lt;add a space here&gt;
  dbSID = xxx&lt;add a space here&gt;
  </code></pre>
  
  <p>i already have the number of lines in the file (using len) so i know
  how much time to repeat the loop of adding the space string.
  i also know how to open a file for reading and writing.</p>
  
  <p>Thank you all.</p>