def get_primes_under_n(n):
    """
    Return list of primes less than n

    >>> get_primes_under_n(23)
    [2, 3, 5, 7, 11, 13, 17, 19]
    """
    if n <= 1:
        return []

    flags = [False, False] + [True for _ in range(2, n + 1)]
    for p in range(2, n // 2 + 1):
        if flags[p]:
            for q in range(2, n // p + 1):
                flags[p * q] = False

    return [i for i, prime in enumerate(flags) if prime and i < n]