title: How to Find The Length of a List Containing Dictionary in Python?
body: <p>I have a list of dictionary:</p>
  
  <pre><code>&gt;&gt;&gt; Fruits = [{'apple': 'red', 'orange': 'orange'}, {'pear': 'green', 'cherry': 'red', 'lemon': 'yellow'}, {}, {}]
  &gt;&gt;&gt; 
  &gt;&gt;&gt; len (Fruits)
  4
  
  List 0: {'orange': 'orange', 'apple': 'red'}
  List 1: {'cherry': 'red', 'lemon': 'yellow', 'pear': 'green'}
  List 2: {}
  List 3: {}
  </code></pre>
  
  <p>Although len (Fruits) does return the "correct" length, I'm wondering if there's a shortcut command only return the length of the list that has values in them?</p>
  
  <p>Ultimately, I wanted to do:</p>
  
  <pre><code># Length Fruits is expected to be 2 instead of 4.
  for i in range (len (Fruits)):
      # Do something with Fruits
      Fruits [i]['grapes'] = 'purple'
  </code></pre>