Panhary H.

asked • 02/27/23

Write a function word_mix(wordlist1, wordlist2) that takes as parameters two lists that contain strings.

Use the following template for EVERY function that you write. The docstring below should be placed inside of the function, just after the function signature.

'''

Purpose:

Parameter(s):

Return Value:

'''



Write a function word_mix(wordlist1, wordlist2) that takes as parameters two lists that contain strings. Have the function return a single string that is the result of concatenating alternating strings from each list, starting with wordlist1, inserting a space character between strings. If the lists do not contain the same number of strings, then continue concatenating strings from the list with more items. Make sure that your final string does not have an extra space character at the end.

Examples (text in bold is returned):

>>> word_mix(['the','brown'],['quick','fox'])

'the quick brown fox'






1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.