Created
August 6, 2022 07:18
-
-
Save aashish-chaubey/802464cdebffffb40aa56d53b9077d97 to your computer and use it in GitHub Desktop.
Revisions
-
aashish-chaubey created this gist
Aug 6, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ import math l = 50 def is_prime(num: int) -> bool: lim = math.floor(math.sqrt(num)) for i in range(2, lim+1): if num % i == 0: return False return True prime_numbers = filter(is_prime, list(range(2, l+1))) print(list(prime_numbers))