There are many scripts out there that return prime numbers, The neck was that it didn't contain 0s and 1s. So, I made a script that adds 0 and 1 to an array of prime numbers and returns it.
Test.py
>>> def Test(a):
...     for i in range(a):
...             if i >= 2 and a%i == 0 :
...                     return False
...     return True
...
>>> [i for i in range(10) if Test(i)]
[0, 1, 2, 3, 5, 7]
Recommended Posts