Dec-16-2019, 01:54 AM
when a write multiple rows in csv file and open it in excel each row is appended leaving 1 row blank between them.
for ex-
when i write 5 rows, it gets appended in rows 1,3,5,7,9
Can anyone tell me why it is happening?
for ex-
when i write 5 rows, it gets appended in rows 1,3,5,7,9
Can anyone tell me why it is happening?
def a(): x=input('Enter book ID') y=input('Enter book name') z=input('Enter author\'s name') p=input('Enter `book category') list[x,y,z,p] with open('books.csv', 'a') as csvfile: csvwriter = csv.writer(csvfile) csvwriter.writerow(List) for i in range(0,10): a()