Help with CSV
'''conn = sqlite3.connect('Logbook.db')
c = conn.cursor()
with open('backup.csv', 'w') as csvfile:
spamwriter = csv.writer(csvfile, delimiter=',',
quotechar=' ', quoting=csv.QUOTE_MINIMAL)
for row in c.execute('SELECT * FROM logbook ORDER BY ID'):
savedline = row
I don't know why but this saves a CSV file just like I want only every line it takes out of the database it saves it double in the CSV file. Can anyone help? I am not sure what It am doing wrong.
I am writing the app in pythonista so I wasn't sure if it was related.
Disregard I figured out the problem.