Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python please Question 3 Not complete Write a function named zip_lists(listi, list2) that takes two integer lists and returns a single integer list that
in python please
Question 3 Not complete Write a function named zip_lists(listi, list2) that takes two integer lists and returns a single integer list that contains all the elements of the two lists zipped together. The two lists should be merged like a zip, that is, one item from listi one followed by one item from list2, then another from each and so on. Marked out of 1.00 Flag question Notes: If one list is longer than the other then, once one list runs out of items, the rest of the other list is added to the result. If both lists are empty then an empty list should be returned. For example: Test Result [1, 4, 2, 5, 3, 6] list1 = [1,2,3] list2 = [4,5,6] print(zip_lists(listi, list2)) [1, 4, 2, 5, 6, 9] list1 = [1,2] list2 = [4,5,6,9] print(zip_lists(listi, list2)) Answer: (penalty regime: 0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 %) Reset answer 1 def zip_lists(listi, list2): 2Step 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