Question: Write a python function alt which takes a list of strings myList as a parameter. alt then returns two strings s1 and s2 as a
Write a python function alt which takes a list of strings myList as a parameter. alt then returns two strings s1 and s2 as a tuple (s1, s2). Here s1 is the concatenation of the strings in myList in even index positions, and s2 is the concatenation of the strings in myList in odd index positions. (List starts at index 0) For example, if
myList = [My, kingdom, for, a , horse],
then s1 = Myforhorse and s2 = kingdoma.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
