def prime_sieve(maximum) -> list:
    """Return a list of primes < maximum."""
    maximum = int(maximum)
    prime_list = []
    primalities = [1] * maximum
    for i in range(2, maximum):
        if primalities[i]:
            prime_list.append(i)
            for j in range(i, len(primalities), i):
                primalities[j] = 0
    return prime_list