0 votes
in Python by
How to write comments in Python?

1 Answer

0 votes
by

In Python, comments start with a # character. However, sometimes, you can also write comments using docstrings(strings enclosed within triple quotes). Unlike C++, Python does not support multiline comments.

Here’s how a comment is written in Python:

>>> #line 1 of comment

>>> #line 2 of comment

Related questions

0 votes
asked Dec 22, 2019 in Python by rajeshsharma
+1 vote
asked Feb 15, 2021 in Python by SakshiSharma
...