def prime_generator(maxi):
    """
    Generate all the prime numbers below maxi. maxi is not included.

    The method uses Aristotle's sieve algorithm.

    >>> prime_generator(10)
    [2, 3, 5, 7]
    """
    li = []
    for _ in range(maxi):
        li.append(1)

    li[0] = li[1] = 0

    for pos, val in enumerate(li):
        if val:
            for index in range(pos+pos, maxi, pos):
                li[index] = 0

    primes = []
    for pos, val in enumerate(li):
        if val:
            primes.append(pos)

    return primes