Oct-12-2019, 09:11 PM
No, that's a list ([]) not a dictionary ({}). You also want to skip the first line, so
for l in buffer[1:]:
. You still need to break down the lines with the strip method, and convert the items in the lines with the int() built-in. Then you need to make sure the student is the dictionary, set up the NAs if they aren't, and add the rating for the correct class. Adding the rating will required you to index the dictionary and the list within the dictionary.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures