subject

It needs to be as simple as possible. each question is slightly different.

1. given the lists list1 and list2, not necessarily of the same length, create a new list consisting of alternating elements of list1 and list2 (that is, the first element of list1 followed by the first element of list2 , followed by the second element of list1, followed by the second element of list2, and so on. once the end of either list is reached, the remaining elements of the longer list is added to the end of the new list. for example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6, 7, 8], then the new list should contain [1, 4, 2, 5, 3, 6, 7, 8]. associate the new list with the variable list3.

2. given the lists list1 and list2 that are of the same length, create a new list consisting of the last element of list1 followed by the last element of list2, followed by the second to last element of list1, followed by the second to last element of list2, and so on (in other words the new list should consist of alternating elements of the reverse of list1 and list2). for example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6], then the new list should contain [3, 6, 2, 5, 1, 4]. associate the new list with the variable list3.

3. given the lists list1 and list2, not necessarily of the same length, create a new list consisting of alternating elements of list1 and list2 (that is, the first element of list1 followed by the first element of list2, followed by the second element of list1, followed by the second element of list2, and so on. once the end of either list is reached, no additional elements are added. for example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6, 7, 8], then the new list should contain [1, 4, 2, 5, 3, 6]. associate the new list with the variable list3.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
What is the definition of digital literacy?
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
You know the right answer?
It needs to be as simple as possible. each question is slightly different.

1. given the...
Questions
Questions on the website: 13722360