You are viewing a single comment's thread. Return to all comments →
Easy pythonic code that anyone can understand
l = [] second_lowest_names = [] scores = set() for _ in range(int(input())): name = input() score = float(input()) l.append([name, score]) scores.add(score) second_lowest = sorted(scores)[1] for name, score in l: if score == second_lowest: second_lowest_names.append(name) for name in sorted(second_lowest_names): print(name, end='\n')
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 →
Easy pythonic code that anyone can understand