You are viewing a single comment's thread. Return to all comments →
Hey nice solution man, but 1 issue though. When the no. of students is 2 and they have the same score,
second_highest = sorted(list(set([marks for name, marks in marksheet])))[1]
this line of code result in IndexError as the size of list is 1.
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all comments →
Hey nice solution man, but 1 issue though. When the no. of students is 2 and they have the same score,
this line of code result in IndexError as the size of list is 1.