You are viewing a single comment's thread. Return to all comments →
second_highest = sorted(list(set([marks for name, marks in marksheet])))[1]
You do not need a list() here, because sorted() will return a sorted list.
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 →
second_highest = sorted(list(set([marks for name, marks in marksheet])))[1]
You do not need a list() here, because sorted() will return a sorted list.