You are viewing a single comment's thread. Return to all comments →
if __name__ == '__main__': list=[] for i in range(int(input())): name = input() score = float(input()) l = (name , score) list.append(l) min_mark1 = min(list, key=lambda x: x[1])[1] filtered_data = [item for item in list if item[1] != min_mark1] min_mark = min(filtered_data, key=lambda x: x[1])[1] min_mark_names = [item[0] for item in filtered_data if item[1] == min_mark] output = sorted(min_mark_names) for name in output: 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 →