the 10001th prime number #tips1 #tips2
# for python3.x
primes = [2, 3, 5, 7, 11, 13]
next_try = 15
while True:
if len(primes) == 10001:
print(primes[-1])
break
if all(next_try % prime > 0 for prime in primes):
primes.append(next_try)
next_try += 2