Same task as Q2 but in Python: read enrolment data Course|StudentID|Name|Plan|Gender from stdin, print the surnames of male students, each once, alphabetically.
$ ./prog < enrollments.txt
Carey
Costner
Neeson
Thorpe
Wang
Python only; no external programs / subprocess. From COMP2041/9044 21T2 Final.