pyassistant

Interleave Two Strings

Given two strings a and b, create a new string by alternating characters from a and b. Start with the first character of a, then the first of b, then the second of a, the second of b, and so on. If one string is longer, append the remaining characters of the longer string to the end of the result. Return the resulting interleaved string.

Example:

Input:
("abc", "12345")
Output:
"a1b2c345"

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.