This is my code:
units_list = [['CITS1001', '95'], ['CITS1401', '100'], ['CITS1402', '97'], ['CITS2002', '99'], ['CITS2211', '94'], ['CITS2401', '95'], ['CITS3001', '93'], ['CITS3002', '93'], ['CITS3003', '91'], ['CITS3200', '87'], ['CITS3401', '98'], ['CITS3402', '93'], ['CITS3403', '88']]
students_list = [['Needie Seagoon', '57', '', '83', '55', '78', '', '91', '73', '65', '56', '', '', ''], ['Eccles', '', '98', '91', '80', '', '66', '', '', '', '77', '78', '48', '77'], ['Bluebottle', '61', '', '88', '80', '60', '', '45', '52', '91', '85', '', '', ''], ['Henry Crun', '92', '', '58', '50', '57', '', '67', '45', '77', '72', '', '', ''], ['Minnie Bannister', '51', '', '97', '52', '53', '', '68', '58', '70', '69', '', '', ''], ['Hercules Grytpype-Thynne', '', '78', '62', '75', '', '67', '', '', '', '48', '56', '89', '67'], ['Count Jim Moriarty', '51', '', '68', '51', '66', '', '55', '72', '50', '74', '', '', ''], ['Major Dennis Bloodnok', '', '54', '47', '59', '', '48', '', '', '', '66', '58', '53', '83']]
normalised = [[students_list[0]] +
[None if students_list is ''
else
## convert number string to float to count
float(studentScores) / float(units_list[index][1])
for index, studentScores in enumerate(students[1:])
] for students in students_list]
print(normalised)
and there is an error in this line:
for index, studentScores in enumerate(students[1:])
What should I change and what caused this problem?