<qiyuangong>415_Add_Strings_1.py
def addStrings( num1, num2):
    if num1 is None:
        num1 = '0'
    if num2 is None:
        num2 = '0'
    res = []
    carry = 0
    ls = min(len(num1), len(num2))
    pos = -1
    while pos + ls >= 0:
        curr = int(num1[pos]) + int(num2[pos]) + carry
        res.insert(0, str(curr % 10))
        carry = curr / 10
        pos -= 1
    while pos + len(num1) >= 0:
        curr = int(num1[pos]) + carry
        res.insert(0, str(curr % 10))
        carry = curr / 10
        pos -= 1
    while pos + len(num2) >= 0:
        curr = int(num2[pos]) + carry
        res.insert(0, str(curr % 10))
        carry = curr / 10
        pos -= 1
    if carry != 0:
        res.insert(0, str(carry))
    return ''.join(res)
def sample_funcname ( var_0 , var_1 ) :
    if var_0 is None :
        var_0 = '0'
    if var_1 is None :
        var_1 = '0'
    var_4 = [ ]
    var_6 = 0
    var_9 = min ( len ( var_0 ) , len ( var_1 ) )
    var_11 = - 1
    while var_11 + var_9 >= 0 :
        var_13 = int ( var_0 [ var_11 ] ) + int ( var_1 [ var_11 ] ) + var_6
        var_4.insert ( 0 , str ( var_13 % 10 ) )
        var_6 = var_13 / 10
        var_11 -= 1
    while var_11 + len ( var_0 ) >= 0 :
        var_13 = int ( var_0 [ var_11 ] ) + var_6
        var_4.insert ( 0 , str ( var_13 % 10 ) )
        var_6 = var_13 / 10
        var_11 -= 1
    while var_11 + len ( var_1 ) >= 0 :
        var_13 = int ( var_1 [ var_11 ] ) + var_6
        var_4.insert ( 0 , str ( var_13 % 10 ) )
        var_6 = var_13 / 10
        var_11 -= 1
    if var_6 != 0 :
        var_4.insert ( 0 , str ( var_6 ) )
    return ''.join ( var_4 )
