title: Finding Min/Max Date with List Comprehension in Python
body: <p>So I have this list:</p>
  
  <pre><code>snapshots = ['2014-04-05',
          '2014-04-06',
          '2014-04-07',
          '2014-04-08',
          '2014-04-09']
  </code></pre>
  
  <p>I would like to find the earliest date using a list comprehension.</p>
  
  <p>Heres what I have now, </p>
  
  <pre><code>earliest_date = snapshots[0]
  earliest_date = [earliest_date for snapshot in snapshots if earliest_date &gt; snapshot]
  </code></pre>
  
  <p>When I print the earliest date, I expect an empty array back since all the values after the first element of the list are already greater than the first element, but I WANT a single value. </p>
  
  <p>Here's the original code just to signify i know how to find the min date value:</p>
  
  <pre><code>for snapshot in snapshots:
      if earliest_date &gt; snapshot:
          earliest_date = snapshot
  </code></pre>
  
  <p>Anyone has any ideas? </p>