So i would first of all isolate all the lines:
with open('filename') as f:
lines = f.readlines()
So i will continue assuming I have a list called lines with the following content:
lines = ["callum,10,7,9","carl,10,10,10","hollie,1,4,7","brad,4,8,3","kyle,7,2,0"]
Then I will firstly sort the line by name
lines = sorted(lines)
Then for each line you want to isolate the marks, sort them and print them back:
for line in lines:
#name is what there is before the first comma
name = line[:line.find(",")]
#marks are what there is after the second comma and are comma separated
marks = line[line.find(",")+1:].split(",")
#sort the marks
marks = sorted(marks,key=int)
#if you want to print only the highest
print "%s,%s"%(name,marks[-1])