title: How to delete a row of CSV file using csv reader in Python?
body: <p>I want to process each row of a csv file and store into database. After that row is stored I want to delete that row in the csv file. I have written code for fetching and storing the row. But I got stuck on deleting a row on csv file.</p>
  
  <p>My code:</p>
  
  <pre><code>import csv
    entries = csv.reader(open('/opt/workspace/jup/juppro/media/docs/phonebook.csv', 'rb'), dialect='excel-tab')
    entries_list = []
    entries_list.extend(entries)
    total_records= len(entries_list)
    uploaded_records=0
    for data in entries_list:
        uploaded_records=uploaded_records+1
        cols = data[0].replace('"','')
        cols1= cols.split(';')
        contact = phonebook()
        contact.email = cols1[0]
        contact.firstname = cols1[1]
        contact.lastname = cols1[2]
        contact.phoneno = cols1[3]
        #names.append(data[0])
        contact.save()
  </code></pre>