title: os.path.isfile on an External file with full path names
body: <p>New python coder.</p>
  
  <p>Setting up a very basic script to remove various files in various locations,
  essentially, an anti virus script. The script appears to run without issues:</p>
  
  <pre><code>import os
  my_tup = (
  '/Users/kevin/Desktop/python/folder1/deleteme.txt',
  '/Users/kevin/Desktop/python/folder2/deleteme.txt',
  '/Users/kevin/Desktop/python/folder3/deleteme.txt')
  
  for value in my_tup:
      if os.path.isfile(value):
          print (value, 'File exists\n')
      else:
          print (value, 'File Not Found\n')
  </code></pre>
  
  <p>I expect my list to get rather long, so I am now using an external file, that I can just add to. The external file will just be a tuple of path names. However, now the loop says none of the files exist, except or the very last entry from the loop?</p>
  
  <pre><code>import os
  datafile = open("data.txt","r")
  for value in datafile.readlines():
      if os.path.exists(value):
          print (value, 'File exists\n')
      else:
          print("Sorry, file does not exist: %s" % value)
  datafile.close()
  </code></pre>
  
  <p>The output from this code is:</p>
  
  <p>Sorry, file does not exist: /Users/kevin/Desktop/python/folder1/deleteme.txt</p>
  
  <p>Sorry, file does not exist: /Users/kevin/Desktop/python/folder2/deleteme.txt</p>
  
  <p>Sorry, file does not exist: /Users/kevin/Desktop/python/folder3/deleteme.txt</p>
  
  <p>/Users/kevin/Desktop/python/folder1/deleteme.txt   File exists</p>
  
  <p>Hope that makes sense.
  Thanks</p>