title: How do I sum consecutive items of a list when i'm using another parameter to decide it
body: <p>I'm doing a problem right now and I'm kinda stuck. I have 2 lists, "sells" and "date". These sells are about several products, and I want to sum all the sells that are from the same month. </p>
  
  <p>Let's say I have </p>
  
  <pre><code>sells = [25, 30, 1, 5, 15, 12]
  date = [July 18, July 18, August 18, September 18, September 18, September 18]
  </code></pre>
  
  <p>Right now I'm trying to solve it like this:</p>
  
  <pre><code>last = None
  sell = []
  for s, d in zip(sells, date):
      if d == last
      sell.append(sum(s)
  </code></pre>
  
  <p>I'm kinda following the explanation i read over here: <a href="https://stackoverflow.com/questions/28258278/check-if-next-value-is-equal-o-current-value-in-python-loop">Check if next value is equal o current value in python loop?</a> but I get no output at all.</p>
  
  <p>What am I doing wrong? </p>