Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- primes=[2]
- cand=3
- while len(primes) < 20:
- for factor in primes:
- if cand % factor == 0:
- # Not a prime
- break
- else:
- primes.append(cand)
- cand += 2
- print primes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement