I have a python program for sorting out class scores. My Class1 text file looks like this:
Elizabeth, 2, 7, 3
Anna, 9, 6, 4
Jenny, 8, 1, 5
Victoria, 1, 4, 7
This is my code so far:
file=open("Class1.txt","r")
studentscores= []
for row in file:
studentscores.append(row.strip())
studentscores2=[]
for item in studentscores:
studentscores2.append(item.split(","))
I'm struggling how to how to convert the string into integers so that I can sort the numbers? I would appreciate some help.