Mar-01-2019, 05:56 PM
You're looking at this the wrong way. Your goal is not to print the non-prime numbers. The printing is being done by the rest of the code. You need to trick the rest of the code into skipping the prime numbers. The generator is the first parameter to your function. If the generator is going to produce a prime number next, you need to call next(generator) to get it to skip that prime number.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures