file will be double-spaced the writerow(method for writer objects takes list argument each value in the list is placed in its own cell in the output csv file the return value of writerow(is the number of characters written to the file for that row (including newline charactersthis code produces an output csv file that looks like thisspam,eggs,bacon,ham "helloworld!",eggs,bacon,ham , , , notice how the writer object automatically escapes the comma in the value 'helloworld!with double quotes in the csv file the csv module saves you from having to handle these special cases yourself the delimiter and lineterminator keyword arguments say you want to separate cells with tab character instead of comma and you want the rows to be double-spaced you could enter something like the following into the interactive shellimport csv csvfile open('example tsv'' 'newline=''csvwriter csv writer(csvfiledelimiter='\ 'lineterminator='\ \ 'csvwriter writerow(['apples''oranges''grapes'] csvwriter writerow(['eggs''bacon''ham'] csvwriter writerow(['spam''spam''spam''spam''spam''spam'] csvfile close(this changes the delimiter and line terminator characters in your file the delimiter is the character that appears between cells on row by defaultthe delimiter for csv file is comma the line terminator is the working with csv files and json data