reader = csv.reader(open('new_mondy_csc_data_revise.csv'), delimiter=',', quotechar='"')
header = tuple(reader.next())
print "%-14s|%-10s|%-5s|%-5s|%-11s|%-11s|%-11s|%-11s|%-11s|%3s" % header # read header line from csv
print "-" * 45
There are a total of 10 fields in the header across a csv file
I want to print the first three instead, how can I do that?