title: Convert \r text to \n so readlines() works as intended
body: <p>In Python, you can read a file and load its lines into a list by using</p>
  
  <pre><code>f = open('file.txt','r')
  lines = f.readlines()
  </code></pre>
  
  <p>Each individual line is delimited by <code>\n</code> but if the contents of a line have <code>\r</code> then it is not treated as a new line. I need to convert all <code>\r</code> to <code>\n</code> and get the correct list <code>lines</code>.</p>
  
  <p>If I do <code>.split('\r')</code> inside the <code>lines</code> I'll get lists inside the list.</p>
  
  <p>I thought about opening a file, replace all <code>\r</code> to <code>\n</code>, closing the file and reading it in again and then use the <code>readlines()</code> but this seems wasteful.</p>
  
  <p>How should I implement this?</p>