Question: python 3. Write a function replacer() that takes a list of sentences, and two strings. The wo strings represent the word to find and the
3. Write a function replacer() that takes a list of sentences, and two strings. The wo strings represent the word to find and the word to replace it with. You will return a list of new sentences. The following shows several sample runs of the function: >>>replacer (The test. Will your solution work in this text. bot it will. 1, test,'exam). 'This is a exam.'. Hill your solution work in this exam?', 'I bet it will. >>> replacer l'The cat in the hat.', 'Cats have nine lives. Why does the cat igore me?. '1.'cat', 'kitty) ['The kitty in the hat.'. 'Cats have nine lives.', 'Why does the kitty ignore me?.')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
