Home  >  Article  >  Backend Development  >  What are python comment characters

What are python comment characters

藏色散人
藏色散人Original
2019-06-27 11:39:486882browse

What are python comment characters

What are python comment characters?

There are many kinds of comments in python, including single-line comments and multi-line comments. Line comments, batch comments, and Chinese comments are also commonly used.

1. Python single-line comment symbol (#)

The pound sign (#) is often used as a single-line comment symbol. When # is used in the code, the right side of it Any data will be ignored and treated as comments. The content to the right of

print 1 #输出1

# will not be output during execution. ,

2. Batch, multi-line comment symbols

In python, there will also be comments with many lines. In this case, batching is required. Multi-line comments. Multi-line comments are enclosed in triple quotes ''' '''

Related recommendations: "Python Tutorial"

The above is the detailed content of What are python comment characters. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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