You are viewing a single comment's thread. Return to all comments →
I just started learning python and this commetn just helped me understand it a lot better!
students = sorted([[raw_input(), float(input())] for _ in range(int(input()))])
secndLow = sorted(list(set(grade for [_, grade] in students)))[1]
print ("\n".join( name for [name, grade] in students if grade == secndLow))
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 →
I just started learning python and this commetn just helped me understand it a lot better!
students = sorted([[raw_input(), float(input())] for _ in range(int(input()))])
secndLow = sorted(list(set(grade for [_, grade] in students)))[1]
print ("\n".join( name for [name, grade] in students if grade == secndLow))