Jul-21-2023, 04:21 PM
I suggest you start with this:
You should never try to write a complete program. Write your program in parts. Get one part working and then move on to the next. For this program I would first verify I can read the CSV file. Once I do that, I would work on the part that adds the students to the sutdents list. Finally I would work on the part that produces output.
import csv with open("harrypotter.csv") as file: reader = csv.reader(file) for student in reader: print(student)It will point out the reason for your unpacking problem.
You should never try to write a complete program. Write your program in parts. Get one part working and then move on to the next. For this program I would first verify I can read the CSV file. Once I do that, I would work on the part that adds the students to the sutdents list. Finally I would work on the part that produces output.