title: Size of dictionary
body: <p>I am trying to get the actual size of a dict in the memory. I got a weird results and I am looking forward to your feedback. </p>
  
  <pre class="lang-py prettyprint-override"><code>a = {}
  for i in range(2):
      a[i] = {}
      for j in range(1000):
          a[i][j] = j
  
  sys.getsizeof(a), sys.getsizeof(a[0]), sys.getsizeof(a[1])
  </code></pre>
  
  <p>the results is 272, 49424, 49424 bytes. I expect the size of a is the sum of a[0] and a[1]. </p>
  
  <p>but if tried the following</p>
  
  <pre class="lang-py prettyprint-override"><code>a = {}
  for i in range(2000):
     a[i] = [i,i,i]
  sys.getsizeof(a)
  </code></pre>
  
  <p>size of a = 196880 bytes. The first one has 2000 keys and the second one has 2 keys and each one has dict with 1000 keys. </p>