Skip to content

Python Comments

The # hash symbol means 'comment' Python will ignore anything that is written after the hash - it is a way to add your own headings, notes or reminders to the program.

It can be on a line by itself or at the end of a line of code.

# Print Hello World To the screen
print("Hello World") # This line prints Hello World to the screen

Can comment out multiple lines of code using 3 single quotation marks on line before and line after the the block you want to comment

'''
Multiline comment
Line 2
'''

tagcheck

tagcheck