<doocs>0848.Shifting Letters_1.py
def shiftingLetters( S, shifts):
    mov = 0
    ans = list(S)
    for i in range(len(S) - 1, -1, -1):
        mov += shifts[i]
        ans[i] = chr((ord(S[i]) - 97 + mov % 26) % 26 + 97)
    return ''.join(ans)
def sample_funcname ( var_0 , var_1 ) :
    var_3 = 0
    var_5 = list ( var_0 )
    for var_9 in range ( len ( var_0 ) - 1 , - 1 , - 1 ) :
        var_3 += var_1 [ var_9 ]
        var_5 [ var_9 ] = chr ( ( ord ( var_0 [ var_9 ] ) - 97 + var_3 % 26 ) % 26 + 97 )
    return ''.join ( var_5 )
