Question: Write function remove_duplicate_words(sentence) which takes an input parameter sentence (type string), and returns a string that has all duplicated words removed from sentence. The words

Write function remove_duplicate_words(sentence) which takes an input parameter sentence (type string), and returns a string that has all duplicated words removed from sentence.

The words in the returned string should be sorted in alphabetical order.

For example:

Test Result
simple_sentence = remove_duplicate_words("hello hello hello hello hello") print(simple_sentence) hello
simple_sentence = remove_duplicate_words("hello hello hi hi hello hi hello hi hi bye") print(simple_sentence) bye hello hi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!