title: Nonetype object has no append attribute append list to dict
body: <p>If i enter in <code>n</code>, a dictionary <code>count_dict</code> of size <code>n+1</code> will be created with keys <code>0...n</code>.</p>
  
  <p>I want to parse through a list called <code>binary_list</code> that contains strings of size <code>n</code> that each compose of 0's or 1's. Each parse will count the number of 1's in the string and <code>append</code>each string with the number of 1's to the appropriate key</p>
  
  <p>ex:</p>
  
  <pre><code>{0:['000'], 1:['001','010','100'] , 2:['011', '101', '110'] , 3:['111']}
  </code></pre>
  
  <p>my code to perform this:</p>
  
  <pre><code>count_dict = dict.fromkeys(range(0,n+1))
  
  for element in binary_list:
      count_dict[element.count('1')].append(element)
  </code></pre>
  
  <p>error"</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "facebook_prob.py", line 23, in sortbit
      count_dict[element.count('1')].append(element)
  AttributeError: 'NoneType' object has no attribute 'append'
  </code></pre>