←
Sets
‹
Example 2 of 5
›
Reset
Run code
Python · edit the code
Ctrl
+
Enter
runs it
Code
attendance = ["Isha", "Rohan", "Isha", "Aarav", "Rohan", "Meera"] print(len(set(attendance)), "different students") print(list(dict.fromkeys(attendance)))
Output · Python 3.14 in your browser