title: How to detect the end of a line in Python
body: <p>Here is my code:</p>
  
  <pre><code>def open_file(filename):
    data = open(filename, "r").read()
    return data
  </code></pre>
  
  <p>The file has two lines, so how can I detect where is line 1 and where is line 2?</p>