Before I make any comment ,I want you to go through this famous faq/blog,Time Limits Based on Programming Language.
See the timelimit for python =3*(timelimit for c++) .
So, for TSORT problem the timelimit for Python coder =3*5=15 seconds ,which i think is fine(although still very tight ) for sorting 10^6 integers in python.
So,your algorithm must be very efficient (use linear time sorting algo for sorting the given 10^6 integers(either counting sort or Radix sort)).
Codechef “as indicated by the large number of successful submissions for cpp/c against almost nil for java/python” does not unreasonably more favour cpp.To keep balance ,they increased the python timelimit thrice in contrast to c/c++.You see more c/cpp submissions because most people still prefer c/cpp as their powerful /strong/favourite programming language since at present its the fastest language (after assembly languages),so even if your algorithm implementation(code-optimisation) is slightly poor/slower,still there is a huge chance for the c/cpp solution to get accepted with in time limit because of fastness of language.
Lastly still ,Is there a way to fix the problem?
Yes there is ,Here is one example::
Use the inbuilt sort function (complexity O(nlogn))of python.
testdata = map(int, map(str.strip, sys.stdin.readlines()))
numbers = testdata.pop(0)
for number in testdata:
Another method includes :counting sort ,Radix Sort,and Heap sort.Sorting algorithm other than these will exceed the timelimit.