Sieve of Eratosthenes .
for i in range ( 2 , 1000 ) : NEW_LINE INDENT if ( isprime [ i ] ) : NEW_LINE INDENT for j in range ( i * i , 1000 , i ) : NEW_LINE INDENT isprime [ j ] = False NEW_LINE DEDENT DEDENT DEDENT