I observe that your inner loop only runs to $n - 1 while in the Python script it runs to n. The former makes sense to me but the latter not. I know little about Python, but running the inner loop to n should produce no primes found at all. Why does it work anyway (I checked it does)? I guess this is off topic as it is a Python question...
In reply to Re^2: Perl vs. Python for prime numbers
by hdb
in thread Perl vs. Python for prime numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |