Home > Backend Development > Python Tutorial > How to comment an entire paragraph in Python

How to comment an entire paragraph in Python

爱喝马黛茶的安东尼
Release: 2019-08-02 09:58:44
Original
35652 people have browsed it

How to comment an entire paragraph in Python

In the process of writing Python code, it is very useful to develop the habit of commenting, so that you or others can easily understand the meaning of the code when reading it later.

If it is a multi-line comment, you can add a "#" sign in front of each line of comment.

How to comment an entire paragraph in Python

Related recommendations: "Python Video Tutorial"

Multi-line comments can also be enclosed in 3 double quotes.

How to comment an entire paragraph in Python

Multi-line comments can also be enclosed in 3 single quotes.

How to comment an entire paragraph in Python

#If you need to comment out the existing code, you can first select the code that needs to be commented out.

How to comment an entire paragraph in Python

Press Ctrl / again, and a "#" sign will be added before the selected code line, indicating that the code has been commented out and will not be run again.

How to comment an entire paragraph in Python

The above is the detailed content of How to comment an entire paragraph in Python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template