I was wondering if we can print like row-wise in python.
Basically I have a loop which might go on million times and I am printing out some strategic counts in that loop
a=int(input("RangeFinal ")) print("Prime Numbers in the range") for n in range(2, a): p=0 for x in range(2, n): if n % x == 0: break else: if(p==0): print(n,end=' ') p=1
Answer
RangeFinal 19 Prime Numbers in the range 3 5 7 9 11 13 15 17