mix_string¶
Requirements:
access a single character
substrings and slicing
string building and filtering
Get two strings from user input. Let’s call them a
and b
. Create a bigger string made of the first char of a
, the first char of b
, the second char of a
, the second char of b
, and so on. Any leftover chars go at the end of the result.
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.