Python implementation of primes.