title: Filling empty dictionary in Python
body: <p>I have trouble filling an empty dictionary in Python</p>
  
  <p>I declare the dictionary as follow :</p>
  
  <pre><code>my_dict = {}
  </code></pre>
  
  <p>I want to fill it with different key and differents values one at a time. 
  I would like to have at the end something like :</p>
  
  <pre><code>{"1":(1,2,3,4),"2":(4,5,6,7),"3":(8,9,10,11),"4":(12,13,14,15)}
  </code></pre>
  
  <p>Therefore I tried to do it as follow : </p>
  
  <pre><code>for i in range(4):
      for j in range(4):
           my_dict[str(i)].append(j)
  </code></pre>
  
  <p>But I have the following error at the first loop : </p>
  
  <blockquote>
    <p>KeyError Traceback (most recent call last)
         in ()
        2 for i in range(4):
        3     for j in range(4):
        ----> 4          my_dict[str(i)].append(j)<br>
        KeyError: '0'</p>
  </blockquote>
  
  <p>I have a much more complicated for loop in my code but I tried to be the more general as possible to help other who might have a similar problem.
  At the end I would like to have different size's value for each key.</p>
  
  <p>If you have any idea why it does not work and how to fix it please feel free to answer.</p>
  
  <p><strong>EDIT</strong> </p>
  
  <p>Sorry for the confusion, I wanted something like the following :</p>
  
  <pre><code>{'1': [1, 2, 3, 4],
               '2': [5, 6, 7, 8],
               '3': [9, 10, 11, 12],
               '4': [13, 14, 15, 16]})
  </code></pre>