Comments is used to explain Python code.
Comments is used to make the code more readable.
Comments is used to prevent execution when testing code.
Python Support two types of comments:
Single line comments
In python Single Line Comments can be done using the hash (#) symbol at the beginning of the line.
>>>a = 5 # this is my comment
Multiline comments are done using delimiter (“””) at the start and end of lines.
Like that –
#This is a multi line comment
#more than just one line
This is a multi line comment
more than just one line
Thanks for reading this, if you have any doubt please do the comments so we can make changes if anything’s is missing.
In the next tutorial, we will learn about “python variables”