title: Group list of dictionary as list of list of dictionary based on multiple keys
body: <p>How to group list of dictionary as list of list of dictionary based on multiple key elements(gender &amp; class)?</p>
  
  <pre><code>input = [{'name':'tom','roll_no':1234,'gender':'male','class':1},
        {'name':'sam','roll_no':1212,'gender':'male','class':1},
        {'name':'kavi','roll_no':1235,'gender':'female','class':2},
        {'name':'maha','roll_no':1211,'gender':'female','class':2}]
  
  expected_output =[[
            {'name':'tom','roll_no':1234,'gender':'male','class':1},
            {'name':'sam','roll_no':1212,'gender':'male','class':1}], 
         [{'name':'kavi','roll_no':1235,'gender':'female','class':2},
        {'name':'maha','roll_no':1211,'gender':'female','class':2}]
  </code></pre>