DEV Community

Discussion on: Using Python to Loop through lists

Collapse
 
incrementis profile image
Akin C.

Hello hrishikesh1990,

thanks for your article.
I particularly like your final thoughts, expecially "we named our list colors (plural) and the variable in our for loop as color (Singular)".
I always do this intuitively and now I'm happy to read that this is a best practice :D!

Collapse
 
hrishikesh1990 profile image
hrishikesh1990

Glad to hear that. Indeed, it's a good practice and would significantly increase the readability of the code.