title: python dictionary error AttributeError: 'list' object has no attribute 'keys'
body: <p>I have an error with this line. I am working with a dictionary from a file with an import. This is the dictionary:</p>
  <pre><code>users = [{'id':1010,'name':&quot;Administrator&quot;,'type':1},{'id':1011,'name':&quot;Administrator2&quot;,'type':1}]
  </code></pre>
  <p>And the method with which the work is as follows:</p>
  <pre><code>def addData(dict, entry):
      new = {}
      x = 0
      for i in dict.keys():
          new[i] = entry(x)
          x += 1
      dict.append(new)
  </code></pre>
  <p>Where &quot;dict&quot; would be &quot;users&quot;, but the error is that the dictionary does not recognize me as such. Can anyone tell me, I have wrong in the dictionary?</p>