Why do these two implementations produce different results?
<p>I asked <a href="http://stackoverflow.com/q/5523058/115543">this question</a> and got an excellent answer (thanks!).  Part of the problem to be solved involved taking a word and de-interlacing it, so that you get two words, one containing the even-indexed characters of the original word, the other containing the odd-indexed characters.</p>

<p>The responder used the following code to do this:</p>

<pre><code>for w in words:
    even, odd = w[::2], w[1::2]
</code></pre>

<p>I did it this (worse) way:</p>

<pre><code>for w in words:
    lst1 = []
    lst2 = []
    for c in w:
        if w.index(c) % 2 == 0:
            lst1.append(c)
        else:
            lst2.append(c)
    even = ''.join(lst1)
    odd = ''.join(lst2)
</code></pre>

<p>Okay, my way is worse for a number of reasons.  But it seems to me as though both ways should at least produce the same pairs of words.  And yet, I get different results using his implementation than mine.  Why is that?</p>
