I have this code for writing a list to a CSV file, but when I run it, it creates spaces between each of the lines I want to write. To show you, this is my code:
savelst = [[1,2,3,4,5],[1,2,3,4,5]]
with open('file.csv', 'w') as f:
writer = csv.writer(f, delimiter=',')
writer.writerows(savelst)
and it gives me this result:
1,2,3,4,5
1,2,3,4,5
So I don't want the space in between.