• + 0 comments

    A cleaner way of writing the code.

    if __name__ == '__main__':
       
        students = [[input(), float(input())] for _ in range(int(input()))]
        second_lowest = sorted(set(g for _, g in students))[1]
        print('\n'.join(sorted(n for n, g in students if g == second_lowest)))