Surely a CSV file is only a CSV file if it has multiple items on each line?
It isn’t that complex in Python. There is an example here:
http://highercomputingscience.org/wiki/Sequential_files
It does what you are talking about but one of the items of data is a registration class instead.
It would be something like:
filename = “people.csv”
name = []
coursework = []
prelim = []
#open file
txtfile = open(filename)
print “Loading file”,filename
# for each line in file
for line in txtfile:
l = txtfile.readline() # read into line
mylist = l.split(‘,’) # split into 3 elements
name.append(mylist[0].strip()) # add element 1 to name array
coursework.append(mylist[1].strip()) # add element 2 to regclass array
prelim.append(mylist[2].strip()) # add element 3 to score array
txtfile.close()