<doocs>1417.Reformat The String_1.py
def reformat( s: str) -> str:
    a = [c for c in s if c.islower()]
    b = [c for c in s if c.isdigit()]
    if abs(len(a) - len(b)) > 1:
        return ''
    if len(a) < len(b):
        a, b = b, a
    ans = []
    for x, y in zip(a, b):
        ans.append(x + y)
    if len(a) > len(b):
        ans.append(a[-1])
    return ''.join(ans)
def sample_funcname ( var_0 : str ) -> str :
    var_4 = [ var_2 for var_2 in var_0 if var_2.islower ( ) ]
    var_6 = [ var_2 for var_2 in var_0 if var_2.isdigit ( ) ]
    if abs ( len ( var_4 ) - len ( var_6 ) ) > 1 :
        return ''
    if len ( var_4 ) < len ( var_6 ) :
        var_4 , var_6 = var_6 , var_4
    var_11 = [ ]
    for var_13 , var_14 in zip ( var_4 , var_6 ) :
        var_11.append ( var_13 + var_14 )
    if len ( var_4 ) > len ( var_6 ) :
        var_11.append ( var_4 [ - 1 ] )
    return ''.join ( var_11 )
