csv files howeveras it is csv filewe can also open it in excelthe csv reader class csv reader object is obtained from the csv reader(function it implements the iteration protocol if csv reader object is used with for loop then each time round the loop it supplies the next row from the csv file as listparsed according to the current csv dialect reader objects also have the following public attributescsvreader dialect read-only description of the dialect in use by the parser csvreader line_num the number of lines read from the source iterator this is not the same as the number of records returnedas records can span multiple lines the following provides very simple example of reading csv file using csv reader objectprint('starting to read csv file'with open('sample csv'newline=''as csvfilereader csv reader(csvfilefor row in readerprint(*rowsep=''print('done reading'