import math


def primes_less_than_seive(n):
    """
    Return all the primes less than n.
    """
    is_prime = [True]*n
    is_prime[0], is_prime[1] = False, False
    upper = int(math.sqrt(n))
    for p in range(2, upper+1):
        if not p:
            continue
        for k in range(2*p, n, p):
            is_prime[k] = False
    return [p for p, flag in enumerate(is_prime) if flag]