Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 537 Bytes

File metadata and controls

19 lines (11 loc) · 537 Bytes

028 remove duplicate words

📝 Instructions:

  1. Write a function remove_duplicate_words() that receives a string as parameter and returns the words after removing all duplicate words and sorting them alphanumerically.

Example input:

remove_duplicate_words("hello world and practice makes perfect and hello world again")

Example output:

  • "again and hello makes perfect practice world"

💡 Hints:

  • We use set container to remove duplicated data automatically and then use sorted() to sort the data.