I am trying to convert the data here which I put in a text file to convert into CSV file.
This is the code:
import csv
txt_file = r"TestData1.txt"
csv_file = r"TestData1.csv"
in_txt = csv.reader(open(txt_file, "rt"), delimiter = '\t')
out_csv = csv.writer(open(csv_file, 'wt'))
out_csv.writerows(in_txt)
It works but has a empty line every other line. How do I go fix that?