Created
April 29, 2018 19:32
-
-
Save Lucas-Developer/b07010861e18c74e12259f8407a00b1b to your computer and use it in GitHub Desktop.
Revisions
-
Lucas-Developer created this gist
Apr 29, 2018 .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,8 @@ def eratosthenes2(n): multiples = set() for i in range(2, n+1): if i not in multiples: yield i multiples.update(range(i*i, n+1, i)) print(list(eratosthenes2(100)))