6.Python3 comments

Python3 comments

Ensure modules, functions, annotation using the correct method and style within the line

Python is annotated with single-line and multi-line comments:

Python in Single-line comments  begin with #, for example ::

# This is a comment print ( "Hello, World!" )

Multi-line comments with three single quotes  ' '' or three double quotation marks  "", "comment enclose, for example:

1, the single quotation marks ( '' ')

# ! / Usr / bin / python3 
'' ' 
This is a multi-line comments, with three single quotes 
This is a multi-line comments, with three single quotes 
This is a multi-line comments, with three single quotes 
' '' 
Print ( " the Hello, World! " )

2, double quotation marks ( "" ")

# ! / Usr / bin / python3 
"" "  
This is a multi-line comment, use three double quotes 
This is a multi-line comment, use three double quotes 
This is a multi-line comment, use three double quotes 
" "" 
Print ( " the Hello, World! " )

 

Guess you like

Origin www.cnblogs.com/QLEO/p/11809781.html