Only thing I could think of is something having to do with the else statement
import csv
# Python program to display all the prime numbers within an interval
lower = 1
upper = 1000000000
print("Prime numbers between", lower, "and", upper, "are:")
f = open('PrimeNumberTest.csv', 'w')
writer = csv.writer(f)
for num in range(lower, upper + 1):
# all prime numbers are greater than 1
if num > 1:
for i in range(1, num):
if (num % i) == 0:
continue
else:
writer.writerow([int(i)])
CSV Format: It looks somewhat normal here but in the file itself, you can see that the numbers skip a line everytime
10
11
12
13
14
15
16