importcsvwithopen('abc.csv','r')ascsv_file:csv_reader=csv.reader(csv_file)# csv_reader is like file object. we have to work on itnext(csv_reader)# to skip first row (if that is column names)forlineincsv_reader:print(line)withopen('abc.csv','r')ascsv_file:csv_reader=csv.reader(csv_file)withopen('new_names.csv','w')asnew_file:csv_writer=csv.writer(new_file,delimiter='-')csv_writer.writeheader()# first rowforlineincsv_reader:# also print first rowcsv_writer.writerow(line)withopen('abc.csv','r')ascsv_file:csv_reader=csv.DictReader(csv_file)withopen('new_names.csv','w')asnew_file:fieldnames=['first','second','third']csv_writer=csv.DictWriter(new_file,fieldnames=fieldnames,delimiter=',')forlineincsv_reader:csv_writer.writerow(line)# print as a dictionary, first row values as key for each line values