title: How to append a value on the same key in dictionary of python?
body: <p>I am trying to append a value to the same key in a dictionary.
  (Finally, What I want to make is a dictionary with one key and two values) </p>
  
  <pre><code>keys = list(dictionary.keys())
  for k in keys:
      dictionary.setdefault(k, []).append(0)
  </code></pre>
  
  <p>But it returns error: </p>
  
  <blockquote>
    <p>AttributeError: 'int' object has no attribute 'append'</p>
  </blockquote>
  
  <p>How can I resolve this error?</p>