how can I move a list index value forward 'x' amount of times using python?
<p>I'm trying to unscramble a code using pythonic methods. The way to crack the code is by selecting the letter two places ahead of itself.</p>

<p>For example if the code was</p>

<pre><code>abc
</code></pre>

<p>Then the solution would be</p>

<pre><code>cde
</code></pre>

<p>So I am trying to figure out how I add 2 to the index value of a letter (given it is in a list like the following)</p>

<pre><code>alphabet = ["a","b","c"...."z"]
</code></pre>

<p>I am trying to write code similar to this</p>

<pre><code>def scramble(sentence):
    alphabet = ["a","b","c"...]
    solution = []
    for i in sentence:
        newIndex = get index value of i, += 2
        newLetter = translate newIndex into the corresponding letter
        solution.append(newLetter)
    for i in solution:
        print(i, end="")
</code></pre>

<p>But I am not yet skilled enough in python to figure it out</p>

<pre><code>alphabet = "abc"
ord_a = ord('a')
solution = ''.join(chr((ord(c)-ord_a+2)%26+ord_a) for c in alphabet)
</code></pre>

python