The Octothorpe (#, number) symbol in Python represents comments. They are an important part of your programs. In principle, you can quickly disable parts of your programs that you don’t want to delete just yet. The other useful thing is you can use commenting to describe the functioning of the program in easily understandable English words.
# I could describe the purpose of my program here. It would be easier for me to know # what it does at a later time. # Things that follow the # sign are ignored by the python interpreter. print "Hello World!" # anything before the # sign will run, anything after won't. # If I wanted to disable a python print command it would be like this: # print "This is a disabled print command and it wont run." print "Another command that will run."
Let’s see what the result of the above program will be. You may try it in your Python IDE, or even online, like here. The result will be:
Hello World! Another command that will run.
I hope you now know what the Octothorpe (#, number) symbol is being used in Python for. Don’t be lazy, use it often throughout your code, so you will have easier time navigating through your code later.