Why should I write comments in my code?



Is there a reason to comment code? If I’m writing it, I’m familiar with what it’s doing.


Writing helpful comments in your programs is an excellent habit! You may understand what you’re writing in the moment, but if you look at that same code six months from now, it may not be so clear, especially as your projects grow in size!

It’s a good idea to briefly explain your code anywhere you think it might help your future self, or other programmers who may read your code.

FAQ: Learn Python - Python Syntax - Comments

what will happen to the code when its progressing ?


The computer ignores comments, so there’s no performance reason not to use them.