Weave strings together[FINALIZED]
+3
−0
Given a list of strings(and optionally, their length) as input, weave the strings together.
Intro
Your goal is to mimic the WV
operator in Pip. Take a list of strings and alternate between their characters like so:
hello,
world, → hwc,eoo,lrd,lle,od → hwceoolrdlleod
code
Effectively, you need to group the characters at each index, and join them into a single string.
No truncation should be done, and all the characters of each string must be used.
Test Cases
["kino","cinema","movie"] → kcmiionnvoeimea
["code","golf"] → cgoodlef
["Hi","","There"] → HTihere
["Explanation"] → Explanation
You check any other test cases with this program.
0 comment threads