Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 6 (0.5 point) Building from the previous Question 5, let's say we have words from another sentence as a Python list named other words
Question 6 (0.5 point) Building from the previous Question 5, let's say we have words from another sentence as a Python list named other words as shown in the starter code below. Extend the list unique words that you constructed from Question 5 using the extend () method to add the words in other words into the list unique_words. After that, use the list sort () method in the list named unique_words to sort the items of the newly extended list in alphabetical order. Finally, use the print statement to output the content of list unique_words into the Python console. Use the starter code below to get this done and ensure your output exactly matches the expected output below. Starter Code: other_words = ['because', 'am', 'sing', 'happy', 'i'l ### place your code below this line ### ### place your code above this line ### print('unique_words:', unique_words) L - - - - - - - - - - - - - - - - - - - - Expected Output: unique_words: ['am', 'because', 'can', 'do', 'happy', 'i', 'if', 'it', 'sing', 'think', 'you']
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started