reader(csvfile [dialect [**fmtparams]returns reader object that produces the values for each line of input of the input file csvfile csvfile is any iterable object that produces complete line of text on each iteration the returned reader object is an iterator that produces list of strings on each iteration the dialect parameter is either string containing the name of dialect or dialect object the purpose of the dialect parameter is to account for differences between different csv encodings the only built-in dialects supported by this module are 'excel(which is the default valueand 'excel-tab'but others can be defined by the user as described later in this section fmtparams is set of keyword arguments that customize various aspects of the dialect the following keyword arguments can be givenkeyword argument description delimiter doublequote character used to separate fields (the default is ','boolean flag that determines how the quote character (quotecharis handled when it appears in field if truethe character is simply doubled if falsean escape character (escapecharis used as prefix the default is true character used as an escape character when the delimiter appears in field and quoting is quote_none the default value is none line termination sequence ('\ \nis the defaultcharacter used to quote fields that contain the delimiter ('"is the defaultif truewhitespace immediately following the delimiter is ignored (false is the defaultescapechar lineterminator quotechar skipinitialspace writer(csvfile [dialect [**fmtparam]]returns writer object that can be used to create csv file csvfile is any file-like object that supports write(method dialect has the same meaning as for reader(and is used to handle differences between various csv encodings fmtparams has the same meaning as for readers howeverone additional keyword argument is availablekeyword argument description quoting controls the quoting behavior of output data it' set to one of quote_all (quotes all fields)quote_minimal (only quote fields that contain the delimiter or start with the quote character)quote_nonnumeric (quote all nonnumeric fields)or quote_none (never quote fieldsthe default value is quote_minimal writer instancewsupports the following methodsw writerow(rowwrites single row of data to the file row must be sequence of strings or numbers lib fl ff