It seems like it would, but the attempts using my advanced beginner Python are much, much slower! This only checks the numbers up to 100,000, and it takes 5 seconds:
def eratsieve(num):
'''creates a list of primes up to n using Eratosthenes' sieve'''
#first create a list of all the numbers up to num
list1 = [n for n in range(2,num)]
#now change all the multiples of each number to 'X'
for i in range(2,int(sqrt(num))):
for v,j in enumerate(list1):
if type(j) == int and j % i == 0 and j > i:
list1[v] = 'X'
primes = [x for x in list1 if x != 'X']
return primes
primes = eratsieve(100000)
print(primes[-1])