You are viewing a single comment's thread. Return to all comments →
if __name__ == '__main__': list=[] second_lowest = int() for _ in range(int(input())): name = input() score = float(input()) list.append([name, score]) list.sort(key=lambda score: score[1]) lowest = list[0][1] for name, score in list: if score > lowest: second_lowest = score break second_lowest_list = [name for name, score in list if score == second_lowest] second_lowest_list.sort() for name in second_lowest_list: print(name)
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 →