Implementation of the sieve in python3