id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu > zipLists
prev  |  next  |  chance

Given two lists, return a list that combines all of the elements, such that all elements in alternating order that is: a[0], then b[0], then a[1], then b[1] ... until you run out of elements. When one list runs out of elements, the remaining elements are put at the end.


zipLists([], []) → []
zipLists([1, 5], []) → [1, 5]
zipLists([], [8, 9]) → [8, 9]

...Save, Compile, Run (ctrl-enter)

def zipLists( a, b ):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy