Problem 7

Problem: 

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.

What is the 10 001st prime number?


My Solution:

def isprime(n):
  for j in range(2,int(n**0.5)+1):
     if m % j == 0:
        return False
  return True

primes=[2]
dummy = True
n=1

while dummy:
  n=n+2 #only looking at odd integers
  if isprime(n):
    primes += [n]
  if len(primes) == 10001:
    dummy = False

print primes[10000]