Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started