Oct-12-2018, 06:35 AM
It should be something like this (untested):
you can read as:
import csv with open('animals3.csv') as csvfile, open('myfilename.txt, 'w') as fp: readCSV = csv.reader(csvfile, delimiter=',') for row in readCSV: fp.write(row)Again this is rather pointless as a csv file is a text file!
you can read as:
with open('animals3.csv') as fp: for line in fp: print(line.strip()