title: Python sorting, limiting the print of result
body: <p>I want to print entries from a twitter log in order of dates.  I did manage to sort them in order of dates but I can't figure out how to show the recent/top 100 list  </p>
  
  <p>Here's the code:</p>
  
  <pre><code>import codecs
  
  with codecs.open('hoge_qdata.tsv','r', 'utf-8') as tweets:
      tweet_list = tweets.readlines()
      print tweet_list.pop(0).strip()
  
  paired_tweets = sorted([ (int(t.split('\t')[2]), t) for t in tweet_list ], reverse=True)
  for p in paired_tweets:
      print p[1].encode('utf-8').strip()
  </code></pre>
  
  <p>Data file is provided below... <a href="http://web.sfc.keio.ac.jp/~t12102ti/isc/tweetsample.zip" rel="nofollow">http://web.sfc.keio.ac.jp/~t12102ti/isc/tweetsample.zip</a></p>