Well, it seems to generate primes less than n, but breaks if n < 2 (perhaps it should return an empty list?)
Another entry for obfuscated python... %-) --Dethe On 28-Jan-04, at 2:33 PM, Gregor Lingl wrote: > 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] > This past week, everyday when I opened my Wall Street Journal, I was met with a full page ad from Microsoft. This ad was dominated by three simple words "Protect your PC." This strikes me as something akin to the Saudi government running ads in the New York Times in mid-September of 2001 saying "Protect your Tall Buildings." --Russ McGuire
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig