Challenge: Sort and Remove Duplicates in the Collection
Test yourself by sorting and removing duplicates from the collection.
We'll cover the following
Problem statement
Write a program where you do the following:
Define a routine named
give_a_word
that prompts the user to give a word.Define a routine named
display
that sorts the words, removes repeated words, and outputs the contents of the collection.Ask for 5 words and display the words using the above methods.
Sample input
Get hands-on with 1400+ tech skills courses.