Question: Write a function alt which takes a list of strings myList as a parameter, alt then returns two strings s1 and s2 as a tuple

 Write a function alt which takes a list of strings myList

Write a 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. For example, if myList = ['My', 'kingdom', 'for', 'a', 'horse'], then s1 = 'Myforhorse' and s2 = 'kingdom

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!