title: Removing datetime.datetime dates from a list of dates
body: <p>I have a list of dates being returned from a table:</p>
  
  <pre><code>pre_dates = [datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(2015, 4, 16, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0), datetime.datetime(9999, 9, 9, 0, 0)]
  </code></pre>
  
  <p>As you can see, they are in the format <code>datetime.datetime(YYYY, M, DD, H, M)</code>. I basically want to get rid of all the items that are <code>datetime.datetime(9999, 9, 9, 0, 0)</code> from the list. The individual dates actually equate to <code>9999-09-09 00:00:00</code> so I keep trying the following, but it always throws a <code>syntax error: invalid syntax</code> on my <code>if</code> statement. What's the problem here?</p>
  
  <pre><code> for date in pre_dates:
       if date = 9999-09-09 00:00:00:
           pre_dates.remove(date)
  
       # also tried if date = datetime.datetime(9999, 9, 9, 0, 0):
       # same error
  </code></pre>