• + 1 comment

    This solution will break with the following test case:

    [['a', 1.0], ['b', 1.0], ['c', 2.0], ['d', 2.0]]

    Both a and b have the lowest grade. second_lowest_grade = sorted(set(student[1] for student in students))[1] will select [b. 1.0] which is the lowest grade still