Block a user
real era algo for jack
just in case jack ever returns to this, here is a prettier sieve of era implementation:
def sieve_of_eratosthenes(field):
if len(field) == 0:
return []
value = field[0]
if value is not None:
for i in range(0, len(field), value):
field[i] = None
return [value] + sieve_of_eratosthenes(field[1:])
def primes_til(n):
primes = sieve_of_eratosthenes(list(range(2, 20)))
return [i for i in primes if i is not None]
does this support markdown?