Question: duplicates.py IMPORTANT a . Your autotest cases will NOT work if you don t load your sys . argv like below. For this assignment, load

duplicates.py
IMPORTANT
a. Your autotest cases will NOT work if you dont load your sys.argv like
below. For this assignment, load in your sys.argv like so:
duplicated_words = sys.argv[1:]
b. The above duplicated_words is a list-type variable which contains a whole
bunch of lower-cased words (ex.['hello', 'world', 'welcome', 'hello', 'again']).
Create a program, duplicates.py. It should:
a. Remove all duplicate words from the list
b. Then print it in descending order of alphabets (from Z to A).
Example 1- If the list is ['hello', 'world', 'welcome', 'hello', 'again'], the program
should print:
['world', 'welcome', 'hello', 'again']
Example 2- If the list is ['apple', 'banana', 'apple', 'orange', 'pear', 'banana'], the
program should print:
['pear', 'orange', 'banana', 'apple']

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!