python basic grammar - Notes

Note

In python, normally comprising three kinds of annotations, each annotation is a single-line, multi-line comments and annotations Chinese encoding

1. Single-line comments

In python, using the "#" symbol as a single-line comment. From the symbol "#" to change behavior until the start stop, "#" behind all the content as the content of the comment, and python compiler ignored.

The syntax is as follows:

# Footnotes

 

2. Multi-line comments

In python, and not a single multi-line comment tag, but including three between a pair of quotation marks ( "" "······" ""), and not part of any of which may optionally statement as comments, this code will be ignored interpreter, since such a code can be written in multiple lines, it is also known as multi-line comments.

Syntax is as follows:

"""

Contents 1 Notes

Footnotes 2

······

"""

 

Guess you like

Origin www.cnblogs.com/Yu-Mofei/p/11502610.html