Remove Duplicate Registrations
Python
10 pts
Remove Duplicate Registrations
Some students registered for the computer club more than once. The list registrations is given.
- Create a set called
unique_studentsfrom the list. - Print the number of unique students.
- Print the names in alphabetical order with
sorted().
Expected output:
4 ['Abel', 'Merhawi', 'Ruta', 'Selam']
Checklist
- Keep
registrationsunchanged and create the setunique_studentsfrom it. - Print the number of unique students, then the names in alphabetical order.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
