<doocs>2109.Adding Spaces to a String_1.py
def addSpaces( s: str, spaces: List[int]) -> str:
    ans = []
    j = 0
    for i, c in enumerate(s):
        if j < len(spaces) and i == spaces[j]:
            ans.append(' ')
            j += 1
        ans.append(c)
    return ''.join(ans)
def sample_funcname ( var_0 : str , var_2 : List [ int ] ) -> str :
    var_5 = [ ]
    var_7 = 0
    for var_9 , var_10 in enumerate ( var_0 ) :
        if var_7 < len ( var_2 ) and var_9 == var_2 [ var_7 ] :
            var_5.append ( '' )
            var_7 += 1
        var_5.append ( var_10 )
    return ''.join ( var_5 )
