A Meta Ads text-processing pipeline compares two whitespace-delimited strings and needs to identify word occurrences that cannot be matched between them. Write a function that returns the unmatched occurrences, preserving their left-to-right order within their original string.
Matching is case sensitive. If a word occurs a times in the first string and b times in the second, return abs(a - b) copies of that word from the string with the larger count. Preserve the order in which returned copies appear in that source string. Punctuation remains part of a word because words are split only on whitespace.
Implement unmatched_words(s1, s2).
s1 and s2, containing zero or more whitespace-delimited words.def unmatched_words(s1, s2):