I am working on a project which I figured would need to use something like a CSV document for storing data. But I ran into a problem, I need python to write the variable into the next line every time instead of the first line (this is overwriting the existing data in that column). Could anyone please help me to solve my problem?
Here is my code:
import csv
tag=input('Enter label for the new profile: ')
pwd=input('Type password for the new profile: ')
b=open('database.csv', 'w',)
a=csv.writer(b)
a.writerow([tag,pwd])
b.close()
Thanks in advance.