title: Python list group by date,name
body: <p>I've a list like below:</p>
  
  <pre><code>list=[['BMW Z4', 'TEST', 18, '2016-09-26'],
  ['BMW Z4', 'TEST', 144, '2014-10-30'],
  ['BMW 335i', 'TEST', 144, '2013-09-26'],
  ['BMW 335i', 'TEST', 360, '2014-08-31'],
  ['BMW 335i', 'TEST', 360, '2017-08-31'],
  ['BMW 550xd', 'TEST', 18, '2016-10-30'],
  ['BMW 550xd', 'TEST', 36, '2014-10-30']]
  </code></pre>
  
  <p>I'm trying create:</p>
  
  <pre><code>list2=[['BMW Z4', 'TEST', 162, '2016-09-26','2014-10-30'],
  ['BMW 335i', 'TEST', 864, '2017-08-31','2013-09-26'],
  ['BMW 550xd', 'TEST', 54, '2016-10-30','2014-10-30']]
  </code></pre>
  
  <ul>
  <li>1) List is grouped by the very first element</li>
  <li>2) Quantity is sum(third element)</li>
  <li>3) New column is added forth element is newts date    and the fifth
  is the oldest one.</li>
  </ul>
  
  <p>Do You have any suggestion how I can get table like list2 using Python functions ? </p>