import csv import sys results = [] with open("fixed.csv", "w") as out: outcsv = csv.writer(out) with open(sys.argv[1]) as f: reader = csv.reader(f) for row in reader: outcsv.writerow(row[0:-1])