[Edu-sig] [Tutor] what? (late nite entertainment) (*)

Gregor Lingl glingl at aon.at
Fri Mar 25 03:54:43 CET 2005


What is this? Another version of the well known ...

def what(n):
    x,y = range(n), [0]*n
    x[1]= 0
    z = 0
    while z*z <= n:
        z+=1
        if x[z]: x[z*z:n:z]=y[z*z:n:z]
    return [z for z in x if z]

Regards,
Gregor

(*) at least in good old Europe


_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor



More information about the Edu-sig mailing list