DEV Community

Discussion on: Infinite list of prime numbers using Python generators

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.