title: How do I sort data from a list and append the the number of occurrences in the list
body: <p>I am having trouble dissecting this data. I would like to find out how many #1 are in each list. After finding that number, I would like to append it to another list for later.</p>
  
  <p>I seem to be getting the input:</p>
  
  <pre><code>--&gt; [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  </code></pre>
  
  <p>When I really want:</p>
  
  <pre><code>--&gt; [2, 2, 2, 2, 0, 2, 2, 1, 11, 0]
  </code></pre>
  
  <p>This is the code:</p>
  
  <pre><code>d = []
  count = 0
  
  b = [[1,3,6,2,7,3,9,2,7,1,7], 
       [1,5,8,3,0,3,6,2,7,2,1],
       [1,5,2,6,8,6,2,5,1,8,9],
       [5,2,5,2,1,8,1,5,2,4,6],
       [5,7,2,7,3,7,3,7,3,9,2],
       [1,5,8,3,0,3,6,2,7,2,1],
       [5,2,5,2,1,8,1,5,2,4,6],
       [3,6,1,5,7,8,4,3,6,3,3],
       [1,1,1,1,1,1,1,1,1,1,1],
       [3,4,5,6,8,5,7,5,7,3,7]]
  
  for i in b:
      for x in b:
          if x == 1:
              count =+ 1
      d.append(count)
      count = 0
  
  print(d)
  </code></pre>