python convert a csv to a tsv

Solutions on MaxInterview for python convert a csv to a tsv by the best coders in the world

showing results for - "python convert a csv to a tsv"
Christopher
20 Jan 2019
1import csv
2
3with open('D:/AddressEvaluation/NAD/NAD.csv','r') as csvin, open('D:/NAD.txt', 'w') as tsvout:
4    csvin = csv.reader(csvin)
5    tsvout = csv.writer(tsvout, delimiter='\t')
6
7    for row in csvin:
8        tsvout.writerow(row)
9
similar questions
queries leading to this page
python convert a csv to a tsv