Created
January 4, 2019 03:14
-
-
Save 6LYTH3/f623a160d96b1b1df84a3ae904acc0fb to your computer and use it in GitHub Desktop.
list of prime number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_prime(x): | |
print(x) | |
a = (x//i == x/i for i in range(x-1, 1, -1)) | |
print(" - ", list(a)) | |
prime = [] | |
for i in range(1, 10): | |
if is_prime(i): | |
prime.append(i) | |
# print(prime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment