title: Find the last row from a CSV input Python
body: <p>I didn't really find an example related to my question as I don't know Pandas so I post it here. Let me know if this is not clear or already have been responded.</p>
  
  <p>I have a CSV input which I import like this </p>
  
  <pre><code>def import_csv(csvfilename):
      data = []
      with open(csvfilename, "r", encoding="utf-8", errors="ignore") as scraped:
          reader = csv.reader(scraped, delimiter=',')
          row_index = 0
          for row in reader:
              if row:  # avoid blank lines
                  row_index += 1
                  columns = [str(row_index), row[0], row[1], row[2]]
                  data.append(columns)
  
      return data
  </code></pre>
  
  <p>I index rows with input_rows (there is probably a better way for this?)</p>
  
  <p>Input example :</p>
  
  <pre><code>[['1',
    '[FirstValue]',
    'FirstText',
    'AB'],
  
   [...]
  
   ['12',
    "['LastValue']",
    "LastText",
    'YZ']]
  </code></pre>
  
  <p>I'm looking to get the last row of this insput list. Is there a simple way to do that without iterating over all the rows ?</p>
  
  <p>Thank you !</p>