<doocs>1048.Longest String Chain_1.py
def check(w1, w2):
    if len(w2) - len(w1) != 1:
        return False
    i = j = cnt = 0
    while i < len(w1) and j < len(w2):
        if w1[i] != w2[j]:
            cnt += 1
        else:
            i += 1
        j += 1
    return cnt < 2 and i == len(w1)
def sample_funcname ( var_0 , var_1 ) :
    if len ( var_1 ) - len ( var_0 ) != 1 :
        return False
    var_8 = var_5 = var_6 = 0
    while var_8 < len ( var_0 ) and var_5 < len ( var_1 ) :
        if var_0 [ var_8 ] != var_1 [ var_5 ] :
            var_6 += 1
        else :
            var_8 += 1
        var_5 += 1
    return var_6 < 2 and var_8 == len ( var_0 )
