I want to print infinite Prime numbers. How can I do it? I don't want the program to end of its own. How do I do it?
The code I tried is:
i = 2
while True:
while i>1:
for j in range(2, i):
if (i%j)==0:
break
else:
print(i)
But, the above code does not work.