Time limit problem in Prime Generator using Python

I have tried the usual method(checking all odd no upto root n) for this problem using python3. But it does not pass the test case. Unsuprisingly all the submission having 100 score are in C/C++. Please see if its possible to do it in python within time limit.

t=int(input()) for i in range(0,t): m,n=(input().split()) m=int(m) n=int(n) for j in range(m,n+1): flag=0 for k in range(2,int(j**0.5 +1)): if(j%k==0): flag=1 break; if(flag==0 and j!=1): print(j,end=" β€œ) print(”\n")

I am using the above code which gives 50 score and a TLE in second case

Yes, this particular test case is being looked into by the development team. It’ll be updated soon.