DEV Community

Discussion on: Infinite list of prime numbers using Python generators

Collapse
 
jovan_cosovic profile image
Jovan Cosovic

Can u help me with describing the part of the code below i = 3?
Thanks.

Collapse
 
alebian profile image
Alejandro Bezdjian

Hi Jovan, the first ifs in the code cover the cases where i <= 1 and i == 2, so starting the iteration with i = 1 will repeat the first 2 cases. It's just a minimum performance improvement.