<doocs>1305.All Elements in Two Binary Search Trees_1.py
def merge(t1, t2):
    ans = []
    i = j = 0
    while i < len(t1) and j < len(t2):
        if t1[i] <= t2[j]:
            ans.append(t1[i])
            i += 1
        else:
            ans.append(t2[j])
            j += 1
    while i < len(t1):
        ans.append(t1[i])
        i += 1
    while j < len(t2):
        ans.append(t2[j])
        j += 1
    return ans
def sample_funcname ( var_0 , var_1 ) :
    var_2 = [ ]
    var_5 = var_3 = 0
    while var_5 < len ( var_0 ) and var_3 < len ( var_1 ) :
        if var_0 [ var_5 ] <= var_1 [ var_3 ] :
            var_2.append ( var_0 [ var_5 ] )
            var_5 += 1
        else :
            var_2.append ( var_1 [ var_3 ] )
            var_3 += 1
    while var_5 < len ( var_0 ) :
        var_2.append ( var_0 [ var_5 ] )
        var_5 += 1
    while var_3 < len ( var_1 ) :
        var_2.append ( var_1 [ var_3 ] )
        var_3 += 1
    return var_2
