Im not able to solve bro

def gen(x,y):
for i in range(x,y+1):
if i==1:
continue
flag=0
for j in range (2,i):
if(i%j==0):
flag=1
break
if(flag==0):
print(i,end=" ")

n=int(input())
for i in range(n):
x=input().split(" β€œ)
gen(int(x[0]),int(x[1]))
print(”")

https://drive.google.com/file/d/1-bIgOzlw7_cRfIoNr2dtVEPLI6esBbqI/view?usp=sharing

hey @ajaysiddartha ,
What is the actual problem that you are facing in this.

Kindly let me know.
Thank You :slightly_smiling_face:.

im getting time limit exceeded

bro i solved it…im resolving

Its good to hear that.

Thank You :slightly_smiling_face:.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.