• + 2 comments
    1. @HAMZA_SHAKEEL First two lists are created as marksheet and scorelist. marksheet is used to store the values of all the inputs more like a dictionary while the scorelist recores only the scores.
    2. input is put into the range() to make sure there are enough inputs taken for all the inputs gievn and also because we camt be so sure about th amount of inputs.
    3. Then the scores, marks are stored by marksheet+=[[name,score]] scorelist+=[score]
    4. sorted() is a function used to sort the list items in the accending order. Check this link for more info. https://docs.python.org/3/howto/sorting.html
    5. b=sorted(list(set(scorelist)))[1] The second lowest score is taken out to the element b by the index[1].
    6. Then for a,c (a and c are used for the loop process. Nothing special with the functionality of the programme) in the range, all the names which bears the score b is printed.

    And a special note must be made, this may look like its forgetting that the test cases might have more than one lowest score. That issue has been addressed by the use of set(). A set does not have duplicate items. Therefore the check is valid and accurate.