Sanskriti SharmaBegginer
Which special character is used to write comments in Python?
Comments are basically those sentences in Python that are being used to give a description of a statement so that the programmer as well as the reader understands the meaning of the code efficiently.
Share
In Python, the special character used to write comments is the hash symbol (#).
In Python programming language, the ‘#’ or Hash symbol is used to write comments.
But do remember that the ‘#’ or Hash symbol only makes a single line comment, i.e., using this will only make a single line to be commented out.
To write multiline comments or multiple lines as comments, you can simply use 3 Double inverted commas or 3 Quotation marks, i.e., like this “””<your comment here>”””.
The text written between the 3 Quotation marks will be treated as a comment.
Comments in Python
We use # to import the file like numerical python , symbolic python