Question: Please use python to solve it. Problem 2: mix Write a function mix that takes two strings as parameters and returns one string with the
Please use python to solve it.

Problem 2: mix Write a function mix that takes two strings as parameters and returns one string with the first element from the first string, and the second element from the second string, and every other element thereafter. Example call Returns mix(hello, there) htehlelroe mix(1234, abcd) 1a2b3c4d mix(12, abcd) 1a2bcd mix(1234, ab) 1a2b34 Hints: Just try print the strings in the right order first, then worry about returning What happens if one string is longer than the other? There are two approaches: o Loop over the shortest string & then loop over the longest string o Loop over the longest string & have an if inside the loop for the shorter string If you put your ifs inside your loop (I recommend using a while), your solution can be under 10 lines long
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
