First submission per student

Write codeEasy11 min

Your task

An online quiz logs every submission in arrival order as rows "student,answer". Only a student's FIRST submission counts; later ones are ignored. Return the counting rows, one per student, the first they sent, in the order those students first appeared. Example: ["ava,B", "raj,C", "ava,D"] gives ["ava,B", "raj,C"].

Examples

first_submissions(rows: list[str]) -> list[str]
Example 1
Inputfirst_submissions(["ava,B", "raj,C", "ava,D"])
Output["ava,B", "raj,C"]