On 10/9/20 10:57 AM, Mark Lawrence wrote: Check the OP's output and 3 appears > twice, 5 three times. yeah, my bad, I followed up. Unless there's a one liner using the itertools > module, which I'm too lazy to try out right now, I'd say that you might > as well stick with his original loop. turns out there is :)