def sieve_to_primes(sieve):
    """Accepts a zero-indexed sieve and returns all primes found."""
    primes = []
    for i in range(len(sieve)):
        if sieve[i]:
            primes.append(i)

    return primes