Exercise 5 · Chapter: SetsRequired+50 XP
Add to Set
Start with an empty set. Read 5 items from input (some may be repeated). Print the number of unique items, then print each unique item sorted alphabetically.
Example: if you add apple, banana, apple, cherry, banana:
3 apple banana cherry
Need a hint?
3 available · costs 5 XP each
python
Output
Run your code to see the output here.