title: Python: Sort a list into multiple lists or dictionary
body: <p>I have a list of strings, here's an example:</p>
  
  <pre><code>wallList = ['wall_l0', 'wall_l1', 'wall_broken_l0', 'wall_broken_l1',
               'wall_vwh_l0','wall_vwh_l1', 'wall_vwh_broken_l0', 
               'wall_vwh_broken_l1', 'wall_vpi_l0', 'wall_vpi_l1', 
               'wall_vpi_broken_l0', 'wall_vpi_broken_l1']
  </code></pre>
  
  <p>And I'd like to group them together by wall type, and state (default / broken):</p>
  
  <pre><code>[['wall_l0', 'wall_l1'],['wall_broken_l0', 'wall_broken_l1']]
  
  [['wall_vwh_l0', 'wall_vwh_l1'],['wall_vwh_broken_l0', 'wall_vwh_broken_l1']] 
  
  [['wall_vpi_l0', 'wall_vpi_l1'],['wall_vpi_broken_l0', 'wall_vpi_broken_l1']]
  </code></pre>
  
  <p>Anyone know how best to do this, or know of a python recipe?</p>