title: How can I count occurrences of sublists in a list and display them as dict
body: <p>I have the next list:</p>
  <pre><code>lst = [[&quot;Orange&quot;, &quot;Carrot&quot;], [&quot;Green&quot;, &quot;Apple&quot;], [&quot;Yellow&quot;, &quot;Banana&quot;], [&quot;Orange&quot;, &quot;Pumpkin&quot;], [&quot;Green&quot;, &quot;Apple&quot;]]
  </code></pre>
  <p>How can i display them as the following dict?:</p>
  <pre><code>dict_sum = {'Orange': {'Carrot': 1, 'Pumpkin': 1}, 'Green': {'Apple': 2}, 'Yellow': {'Banana': 1}}
  </code></pre>