title: How to assign to a list in a dictionary
body: <p>Sorry I have searched for this, and it seems simple but I can't figure it out.  I am trying to assign values to a list in my dict:</p>
  
  <pre><code>class Test(object):
      def __init__(self):
  
          self.test =  { "color": ["", "", "", ""],
                            "incandescence": ["", "", "", ""] }
  
      def setTest(self):
          key = "color"
          print "KEY is", key
          self.test[key][0] = "TEST"
  
          print self.test
  
      def clearDict(self):  
          for key in self.test:
              self.test[key] = ""      
  
  x = Test()
  x.clearDict()
  x.setTest() 
  </code></pre>
  
  <h1>Error: line 1: TypeError: file  line 10: 'str' object does not support item assignment #</h1>
  
  <p>Why can't I assign a string to the 0th element?  How is this not the same as:</p>
  
  <pre><code>test = ["", "", ""]
  
  test[0] = "test"
  
  print test
  </code></pre>
  
  <p>Answer: ['test', '', '']</p>