AttributeError: 'str' object has no attribute 'append'
<pre><code>&gt;&gt;&gt; myList[1]
'from form'
&gt;&gt;&gt; myList[1].append(s)

Traceback (most recent call last):
  File "&lt;pyshell#144&gt;", line 1, in &lt;module&gt;
    myList[1].append(s)
AttributeError: 'str' object has no attribute 'append'
&gt;&gt;&gt;
</code></pre>

<p>Why <code>myList[1]</code> is considered a <code>'str'</code> object? <code>mList[1]</code> returns the first item in the list <code>'from form'</code> but I cannot append to item 1 in the list <code>myList</code>. Thank you. </p>

<p><strong>Edit01:</strong></p>

<p>@pyfunc: Thank you for the explanation; now I understand. </p>

<p>I need to have a list of lists; so 'from form' should be a list. I did this (please correct if this not the right way):</p>

<pre><code>&gt;&gt;&gt; myList
[1, 'from form', [1, 2, 't']]
&gt;&gt;&gt; s = myList[1]
&gt;&gt;&gt; s
'from form'
&gt;&gt;&gt; s = [myList[1]]
&gt;&gt;&gt; s
['from form']
&gt;&gt;&gt; myList[1] = s
&gt;&gt;&gt; myList
[1, ['from form'], [1, 2, 't']]
&gt;&gt;&gt; 
</code></pre>
