I am trying to remove an index from the nested list but I am getting an error. The error is "TypeError: list indices must be integers or slices, not list". How can I delete indexes in this nested loop?
student = [['Alice', 90], ['Bob', 80], ['Chad', 70]]
sname = input("Student Name?")
for i in student:
if i[0] == sname:
del student[i]