<doocs>0394.Decode String_1.py
def decodeString( s: str) -> str:
    s1, s2 = [], []
    num, res = 0, ''
    for c in s:
        if c.isdigit():
            num = num * 10 + int(c)
        elif c == '[':
            s1.append(num)
            s2.append(res)
            num, res = 0, ''
        elif c == ']':
            res = s2.pop() + res * s1.pop()
        else:
            res += c
    return res
def sample_funcname ( var_0 : str ) -> str :
    var_2 , var_3 = [ ] , [ ]
    var_5 , var_7 = 0 , ''
    for var_8 in var_0 :
        if var_8.isdigit ( ) :
            var_5 = var_5 * 10 + int ( var_8 )
        elif var_8 == '[' :
            var_2.append ( var_5 )
            var_3.append ( var_7 )
            var_5 , var_7 = 0 , ''
        elif var_8 == ']' :
            var_7 = var_3.pop ( ) + var_7 * var_2.pop ( )
        else :
            var_7 += var_8
    return var_7
