title: How to delete the last 3 characters from every line in a file?
body: <p>Can anyone give me some advice on creating a loop to cut the last 3 characters from every line within a input file?</p>
  
  <p>I have tried </p>
  
  <pre><code>iFile = iFile[:-3]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>iFile = iFile.replace(':', '')[:-3]
  </code></pre>
  
  <p>but neither seem to work as I'm getting a:</p>
  
  <pre><code>TypeError: 'file' object has no attribute '__getitem__'
  </code></pre>