I'm new to python I made this code which makes you input data that is Automatticly inputted into excel. The thing is when I run the program twice it overwrites the previous data so I need to know how to save it. this is the code I wrote
import xlsxwriter
workbook = xlsxwriter.Workbook('Book1.xlsx')
worksheet = workbook.add_worksheet()
name = input('your full name: ')
age = int(input('your age: '))
emaill = input('your email: ')
idontknow = (
['Name', name],
['Age', age],
['Email', emaill],
)
row = 0
col = 0
for item, cost in idontknow:
worksheet.write(row, col, item)
worksheet.write(row, col + 1, cost)
row += 1
workbook.close()
any suggestion will help