IndexError: string index out of range (enumerate)
<p>Okay so I have no idea what the problem is here.  Everything I've read basically addresses the range not ending, thus the error, but that doesn't make sense to me since this is a fixed loop.  </p>

<p>I'm simply trying to take a string, and throw each letter into a list one at a time.  What am I missing?</p>

<pre><code>&gt;&gt;&gt; name = "Chris"
&gt;&gt;&gt; 
&gt;&gt;&gt; my_list = []
&gt;&gt;&gt; 
&gt;&gt;&gt; for key, value in enumerate(name):
...     my_list.append(value[key])
...     print (my_list)
...
</code></pre>

<p>The error I'm receiving:</p>

<pre><code>['C']
Traceback (most recent call last):
 File "&lt;pyshell#7&gt;", line 2, in &lt;module&gt;
 my_list.append(value[key])
IndexError: string index out of range
</code></pre>

<p>You are enumerating over a string ("Chris") which means that key and value will hold the following values during the iteration:</p>

<pre><code>0  "C"
1  "h"
2  "r"
3  "i"
4  "s"
</code></pre>

<p>value[key] in the first iteration is ok, it returns 'C'. </p>

<p>In the second iteration, the index 1 is out of range for string "h".</p>

<p>What you probably want to do is this:</p>

<pre><code>for i, value in enumerate(name):
   my_list.append(value)
   print (my_list)
</code></pre>

python python-3.x