I have an 2d array of names and scores and i want remove name and score of student that have minimum score of array ,but when i add 2 or more student with minimum number continuous (fore example [['a',20],['b',10],['c',10],['d',10],['e',10]]) the program just remove first,third(odd) item's. Help me why this happens my code is:
student_list = []
for i in range(int(input())):
student_list.append([])
student_list[i].append(input("enter name : "))
student_list[i].append(int(input("enter score : ")))
min_score = min(student_list,key=lambda detail: detail[1])[1]
for i in student_list:
if (i[1] == min_score):
student_list.remove(i)
print(student_list)