Lists Practise Problems - Q20 - Clarification

Hi Guys,

Screen Link:
https://app.dataquest.io/m/1018/lists/20/sorting-lists-of-lists-ii

I came up with this solution and even though the result is exactly how its shown the solution is not validated as correct when I click “Submit Answer”.

Anything I am doing wrong?

    def sort_index(input_list):
        input_list.sort()
        input_list.sort(key=lambda x: x[2], reverse=True)

    sort_index(grades)
    print(*grades, sep="\n")

I got the following as the output:

['Dieter', 'Male', 'F']
['Jelle', 'Male', 'F']
['Lode', 'Male', 'F']
['Martijn', 'Male', 'F']
['Weston', 'Male', 'F']
['Adam', 'Male', 'D']
['Madeeha', 'Female', 'D']
['Mari', 'Female', 'D']
['Sue', 'Female', 'D']
['Alex', 'Male', 'A']
['Bruno', 'Male', 'A']
['Casey', 'Male', 'A']
['François', 'Male', 'A']
['John', 'Male', 'A']
['Joshua', 'Male', 'A']
['Julie', 'Female', 'A']
['Rebecca', 'Female', 'A']
['Renny', 'Male', 'A']
1 Like

Please make sure to include the link to the Mission in your post so that those who can help you have additional context.

Hi there!
Yesterday I had the same question and saw that your was left not answered. So, 6 month later, but just in case you are still interested in it, here´s what I´ve got answered: