Python combine two integers to a third We have three integers: 

A, B, C where the first (i.e. the most significant) digit of C is the first digit of A, the second digit of C is the first digit of B, the third digit of C is the second digit of A, the fourth digit of C is the second digit of B etc. 

If one of the integers A and B runs out of digits, the remaining digits of the other integer are appended to the result. 

Examples:

A = 1 5 4 8
B =  3 6 9    =&gt;
C = 1356498

A = 1 0
B =  6 58    =&gt; 
C = 16058.


Here is my function which has two arguments, the integers A and B and returns the third integer C:

def myfunction(numberA, numberB):
    numberAstr = str(numberA)
    numberBstr = str(numberB)
    lenght1 = len(numberAstr)
    lenght2 = len(numberBstr)
    lenght3 = lenght1 + lenght2

    cl = []
    c = 0
    al = list(map(int, str(numberA)))
    bl = list(map(int, str(numberB)))

    if lenght1 &gt;= lenght2:
        for i in range(lenght1):
            cl.append(al[i])
            if i &lt;= (lenght2 - 1):
                cl.append(bl[i])
            print("Loop No:", i)
            print(cl)
    elif lenght2 &gt; lenght1:
            for i in range(lenght2):
                if i &lt;= (lenght1 - 1):
                    cl.append(al[i])
                cl.append(bl[i])
            print("Loop No:", i)
            print(cl)
    for i in range(lenght3):
        c += cl[i] * (10 ** (lenght3 - i))
    c //= 10
    return c

numberA = int(input("Enter the first number: "))
numberB = int(input("Enter the second number: "))
print('Integer C:', myfunction(numberA, numberB))


This function works just fine, but I'm sure that there is a pythonic way to do this! So I'm asking for any ideas to improve code efficiency.
You can use more built-in characteristics of the strings.  This code grabs each pair of digits and builds a list, which it then joins with no separator.  Then it adds the remainder from each string.  The shorter string's remainder is the empty string.

def int_merge(a, b):
    str_a = str(a)
    str_b = str(b)
    min_len = min(len(str_a), len(str_b))

    # Grab pairs of numbers while the lengths of both strings allow.
    # After that, add the remainder -- the shorter string will have none.
    result = ''.join([str_a[i]+str_b[i] for i in range(min_len)]) + \
             str_a[min_len:] + str_b[min_len:]
    return result

test = [
    (1548, 369),
    (1356, 24),
    (13, 2456)
]
for case in test:
    print int_merge(case[0], case[1])