title: Count number of elements in each row in 2D list
body: <p>I have a 2D list (can be variable size depending on file) like this:</p>
  
  <pre><code> partition2d =  [['A', '1', '5'],
                   ['B', '2', '3', '4'],
                   ['C', '6', '7', '8', '9']]
  </code></pre>
  
  <p>I have another list as:</p>
  
  <pre><code>  guest_list = [0.5, 0.0, 1.0]
  </code></pre>
  
  <p>I want to count the number integers (except the first column which has chars like 'A','B'..) in each row of partition2d and divide this count by total number of integers in partition2d . Here it will be </p>
  
  <pre><code>count['1','5'] = 2. And count[ total integers in partition2d] = 9. 
  </code></pre>
  
  <p>I want to divide it. So I get 2/9 and multiply this number with the respective column of guest_list(that is result of first row of partition2d will be multiplied with first column i.e 0.5 of guest_list and store the result in a new list.</p>
  
  <p>New list will be:</p>
  
  <pre><code>  new_list = [ 0.1111, 0, .4444]   
  </code></pre>
  
  <p>This was done by [ 2/9 * guest_list[0] , 3/9 * guest_list[1], 4/9 * guest_list[2] ]</p>
  
  <p>I just know I can count 1D lists using list.count but I'm finding it difficult to implement the above logic in Python.</p>