Home >Backend Development >Python Tutorial >What does python annotation mean?
What do the python comment characters mean?
Comments in Python include single-line comments and multi-line comments. Single-line comments in Python start with #, and multi-line comments use three single quotes ''' or three double quotes """ to separate the comments. Bracketed. The #, ''' and """ symbols here are comment characters.
Example:
# 这是一个注释 print("Hello, World!")
#!/usr/bin/python3 ''' 这是多行注释,用三个单引号 这是多行注释,用三个单引号 这是多行注释,用三个单引号 ''' print("Hello, World!")
#!/usr/bin/python3 """ 这是多行注释,用三个双引号 这是多行注释,用三个双引号 这是多行注释,用三个双引号 """ print("Hello, World!")
By using a language you are familiar with to annotate certain codes in the program, this is the role of comments, which can greatly enhance the readability of the program.
Related recommendations: "Python Tutorial"
The above is the detailed content of What does python annotation mean?. For more information, please follow other related articles on the PHP Chinese website!