Merge two sorted lists of numbers
I'll answer your question by providing an alternative solution. IDK why you're over complicating this when everything that has to be done is to combine the two lists, then simply sort them:

def merge(array1, array2):
    array1.extend(array2)

    return sorted(array1)



print(merge([1, 3, 4, 7], [0, 2, 5, 6, 8, 9]))
&gt; [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]



The advantages of the above solution are:


there's less code so it's easier to maintain / read
it's using only two built-in functions (so assuming the lists are of a reasonable size, it should be quicker than implementing the sorting/merging in a loop)


There's also a one-liner which is even simpler than the above solution:

def merge(array1, array2):
    return sorted(array1 + array2)



print(merge([1, 3, 4, 7], [0, 2, 5, 6, 8, 9]))
&gt; [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]



You could also use the built-in heapq.merge for this.

Of course, if the lists are very large (like very large), merging two lists will totally make sense.

According to this SO answer unless len(array1 + array2) ~ 1000000 use:

L = array1 + array2
L.sort()


Those are just my 2-cents regarding the subject. I'll let somebody else comment on your code. 

Extra: Even if practicing algorithms is a good idea, an even nicer aspect is knowing when / where to apply them.