 <pre><code>from itertools import chain def shuffle(list1, list2): if len(list1)==len(list2): return list(chain(*zip(list1,list2))) # if the lists are of equal length, chaining the zip will be faster else: a = [] while any([list1,list2]): for lst in (list1,list2): try: a.append(lst.pop(0)) except IndexError: pass return a # otherwise, so long as there's items in both list1 and list2, pop the # first index of each (ignoring IndexError since one might be empty) # in turn and append that to a, returning the value when both lists are # empty. </code></pre> <p>This is not the recursive solution you were looking for, but an explicit one is generally faster and easier to read and debug anyway. @DSM pointed out that this is likely a homework question, so I apologize for misreading. I'll go ahead and leave this up in case it's enlightening to anyone.</p>