How to limit my output to false statements?
<p>enter code hereMy code takes the numbers in range 500-100000 and tests them for primality twice. Once with fermit's little theorem and again with a better primality test. The output given is every number identified as prime in fermits and next to it, its correct primality in the form of true=prime and false=not prime for example:2753 is prime True,
2767 is prime True,
2777 is prime True,
2779 is prime False,
2789 is prime True,
What I need to know is how do I only output the ones that are false? I can't change the functions I called on.</p>

<pre><code>    from exactPrimalityTest import *
    import random
    from fastPowerMod import *
    for n in range(500,100001):
        a = random.randint(1,n-1)
        for i in range(10):
            if (fastPowerMod(a,n-1, n) != 1):
                break
        else:
            print n, "is prime", exactPrimalityTest(n)
</code></pre>
