is newline you can change characters to different values by using the delimiter and lineterminator keyword arguments with csv writer(passing delimiter='\tand lineterminator='\ \nchanges the character between cells to tab and the character between rows to two newlines we then call writerow(three times to give us three rows this produces file named example tsv with the following contentsapples oranges grapes eggs bacon ham spam spam spam spam spam spam now that our cells are separated by tabswe're using the file extension tsvfor tab-separated values dictreader and dictwriter csv objects for csv files that contain header rowsit' often more convenient to work with the dictreader and dictwriter objectsrather than the reader and writer objects the reader and writer objects read and write to csv file rows by using lists the dictreader and dictwriter csv objects perform the same functions but use dictionaries insteadand they use the first row of the csv file as the keys of these dictionaries go to header csv file this file is the same as example csv except it has timestampfruitand quantity as the column headers in the first row to read the fileenter the following into the interactive shellimport csv examplefile open('examplewithheader csv'exampledictreader csv dictreader(examplefilefor row in exampledictreaderprint(row['timestamp']row['fruit']row['quantity'] : apples : cherries : pears : oranges : apples : bananas : strawberries inside the loopdictreader object sets row to dictionary object with keys derived from the headers in the first row (welltechnicallyit sets row to an ordereddict objectwhich you can use in the same way as dictionarythe difference between them is beyond the scope of this book using dictreader object means you don' need additional code to skip the first row' header informationsince the dictreader object does this for you