import csv fo = open("result.txt", "w+") reader = csv.reader(open('test.csv')) for line in reader: Name = line[0] fo.writelines(['class ',Name,'{ ']) fo.writelines('}; ') fo.close()
import csv fo = open("result.txt", "w+") reader = csv.reader(open('test.csv')) for line in reader: Name = line[0] fo.writelines(['class ',Name,'{ ']) fo.writelines('}; ') fo.close()