title: to read line from file without getting "\n" appended at the end
body: <p>My file is "xml.txt" with following contents:</p>
  
  <pre><code>books.xml 
  news.xml
  mix.xml
  </code></pre>
  
  <p>if I use readline() function it appends "\n" at the name of all the files which is an error because I want to open the files contained within the xml.txt. I wrote this:</p>
  
  <pre><code>fo = open("xml.tx","r")
  for i in range(count.__len__()): #here count is one of may arrays that i'm using
      file = fo.readline()
      find_root(file) # here find_root is my own created function not displayed here
  </code></pre>
  
  <p>error encountered on running this code:</p>
  
  <pre><code>IOError: [Errno 2] No such file or directory: 'books.xml\n'
  </code></pre>