In this post I’m going to make a quick and simple explanation about comments in our programs. First of all, when you are programming it is very useful to write lines of comments to explain what something does, both for you and someone else who reads it.
In python, we start our comments with the symbol “#”, and they finish when we change lines. When the program runs, they don’t appear and they also don’t make it do anything. They are just notes on the code we made, and they look like this:
#This would be a comment in python!
Here is an example:
And here is how it should run:
Notice how we don’t see the comment when we run it! 😉