title: How to quickly get the last line of a huge csv file (48M lines)?
body: <p>I have a csv file that grows until it reaches approximately 48M of lines.</p>
  <p>Before adding new lines to it, I need to read the last line.</p>
  <p>I tried the code below, but it got too slow and I need a faster alternative:</p>
  <pre class="lang-py prettyprint-override"><code>def return_last_line(filepath):    
      with open(filepath,'r') as file:        
          for x in file:
              pass
          return x        
  return_last_line('lala.csv')
  </code></pre>