Question: python Write a function merge2 (sentencel, sentence2) that takes two sentences as strings for input, splits them into a list of words, merges them into
python
Write a function merge2 (sentencel, sentence2) that takes two sentences as strings for input, splits them into a list of words, merges them into one list two words at a time, and returns one longer sentence Sample run: merge2 ("The quick brown fox jumped over the lazy dog", "The cat ate the fish") "The quick The cat brown fox ate the jumped over fish the lazy dog" Constraints and comments: You may assume there are no special rules for punctuation, capitalization, etc. You may assume that all words will be separated by a single space If the two sentences have uneven length, you should proceed as normal until the smaller sentence is exhausted, then add the remaining larger sentence to the rest of the list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
