Walter Mudzimbabwe wrote: > can anybody help me figure out why the following program cannot produce > primes upto 10. I think this has nothing to do with SciPy? Try comp.lang.python instead. But you can try: def isdivisible(n, listt): return not all(n%d for d in listt) This will short circuit appropriately. Alan Isaac