title: How to store a list as a dictionary - python
body: <p>I know how to store in a list but how do I store these values as a dictionary instead?</p>
  
  <pre><code>    items = []
      for a in range(10):
          items.append([])
          for b in range(10):
              if function() == condition:
                  items[a].append(WRONG)
      for a,b in oldItems:
          items[a][b] = RIGHT
  </code></pre>
  
  <p>So far I have come to the conclusion that I could store items as <code>items = {}</code> but I don't know how to duplicate the <code>.append</code> method with a dictionary. Nor do I know how to access a dictionary like <code>items[a][b]</code> does. Any suggestions? </p>