Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > 72e0913cefe7683427338e51dd70bbde > files > 225

python-cython-0.11.3-1mdv2009.1.x86_64.rpm

def primes(kmax):
    p = []
    k = 0
    n = 2
    while k < kmax:
        i = 0
        while i < k and n % p[i] != 0:
            i = i + 1
        if i == k:
            p.append(n)
            k = k + 1
        n = n + 1
    return p