title: Remove whitespace from Python strings read from file?
body: <p>I've been snooping around and people say to clear this issue you use <code>string.strip()</code> commands or similar to do this... However it isn't working for me... Please help?</p>
  
  <p>I have:</p>
  
  <pre><code>file=open(~/Playlist.txt)
  track=file.readline()
  print track
  </code></pre>
  
  <p>And this gives the line from the file followed by a blank line of space which isn't even in the file... This wouldn't matter so much but and os.file.isfile(track) if statement after can't complete because of this... The strip command and iterations of don't clear this for me... What can I do?</p>