title: How to fix "AttributeError: 'str' object has no attribute 'append'"
body: <pre><code>&gt;&gt;&gt; myList[1]
  'from form'
  &gt;&gt;&gt; myList[1].append(s)
  
  Traceback (most recent call last):
    File &quot;&lt;pyshell#144&gt;&quot;, line 1, in &lt;module&gt;
      myList[1].append(s)
  AttributeError: 'str' object has no attribute 'append'
  &gt;&gt;&gt;
  </code></pre>
  <p>Why is <code>myList[1]</code> 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>.</p>
  <p>I need to have a list of lists; so 'from form' should be a list. I did this:</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>