I got this, but how do I go from this:
['99', '88', '77', '66\n', '11', '22', '33', '44\n', '78', '58', '68', '88\n']
to:
[[99, 88, 77, 66], [11, 22, 33, 44], [78, 58, 68, 88]]
This is the function i used to get the first output:
def class_avg(open_file):
new = []
number = []
for i in open_file:
student = i.split(',')
for grade in student[4:]:
new.append(grade)
return new
This is the file format:
Smith, Joe,9911991199,smithjoe9,99,88,77,66
Ash, Wood,9912334456,ashwood,11,22,33,44
Full, Kare,9913243567,fullkare,78,58,68,88