Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def eratosthenesSieve(n):
- lst = []
- for num in range(1,n + 1):
- if num > 1:
- for i in range(2,num):
- if (num % i) == 0:
- break
- else:
- lst.append(num)
- return(lst)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement