title: How does readline() work behind the scenes when reading a text file?
body: <p>I would like to understand how <code>readline()</code> takes in a single line from a text file. The specific details I would like to know about, with respect to how the compiler interprets the Python language and how this is handled by the CPU, are:</p>
  
  <ol>
  <li>How does the <code>readline()</code> know which line of text to read, given that successive calls to <code>readline()</code> read the text line by line?</li>
  <li>Is there a way to start reading a line of text from the middle of a text? How would this work with respect to the CPU?</li>
  </ol>
  
  <p>I am a "beginner" (I have about 4 years of "simpler" programming experience), so I wouldn't be able to understand technical details, but feel free to expand if it could help others understand!</p>