title: Python list : How to sort by timestamp? ( App Engine related )
body: <p>I have ten entities in my Feed model ( this is an App Engine model)</p>
  
  <pre><code>class Feed(db.Model):
    sometext = db.StringProperty()
    timestamp = db.DateTimeProperty(auto_now=True)
  
  list_of_keys = ["key1","key2","key3".... "key10"]
  </code></pre>
  
  <p>so i call my entities using db.key() method:</p>
  
  <pre><code>feeds = db.keys(list_of_keys)
  # this loop below prints the feed 
  for feed in feeds:
    print humanizeTimeDiff(feed.timestamp) 
  
  # humanizeTimeDiff is a function to change the raw timestamp into a human friendly
  # version: eg-&gt; 10 mins ago, 20 seconds ago
  </code></pre>
  
  <p>but now, how do I sort the feeds according to timestamp? ( I want the newest feeds at the top and the oldest ones at the bottom)</p>
  
  <p>any sort function I can use on the raw timestamp? ( my rough plan is to sort according to the raw timestamp, then humanize the time difference )</p>
  
  <p>PS: I don't plan to use GQL query to query my entities according to timestamp, because I get my input in the form of a list of keys. And using db.key() is a faster method.</p>
  
  <p>hope I supplied enough info. wish to hear your thoughts/solutions.</p>