title: How to to optimize this python problem?
body: <p><a href="http://www.codechef.com/problems/TSORT" rel="nofollow">Here</a> is the problem. And my solution is:</p>
  
  <pre><code>import sys
  LIST_ITEM = []
  NUMBER_OF_TEST_CASES = int(raw_input())
  def non_decreasing(my_list):
      if len(my_list) &lt; 2:
          return my_list
      my_list.sort()
      return my_list
  
  if __name__ == "__main__":
      if NUMBER_OF_TEST_CASES &gt;= 1000001 or NUMBER_OF_TEST_CASES &lt;= 0:
          sys.exit()
  
      for val in range(1, NUMBER_OF_TEST_CASES+1):
          x = int(raw_input())
  
          if x &gt;= 1000001 or x&lt;0:
              sys.exit()
          else:
              LIST_ITEM.append(x)
      values =  non_decreasing(LIST_ITEM)
      for i in values:
          print i
  </code></pre>
  
  <p>But it tell me <code>Time Limit Exceeded</code>. <a href="http://www.codechef.com/status/TSORT,tauquir" rel="nofollow">Here is my solution link</a></p>