Python3 注释

Python 3 教程 · 2019-02-04 17:43:19

确保对模块, 函数, 方法和行内注释使用正确的风格

Python中的注释有单行注释和多行注释:

Python中单行注释以 # 开头,例如::

# 这是一个注释
print("Hello, World!") 

多行注释用三个单引号 ''' 或者三个双引号 """ 将注释括起来,例如:

1、单引号(''')

#!/usr/bin/python3 
'''
这是多行注释,用三个单引号
这是多行注释,用三个单引号 
这是多行注释,用三个单引号
'''
print("Hello, World!") 

2、双引号(""")

#!/usr/bin/python3 
"""
这是多行注释,用三个双引号
这是多行注释,用三个双引号 
这是多行注释,用三个双引号
"""
print("Hello, World!") 

点击查看所有 Python 3 教程 文章: https://www.codercto.com/courses/l/10.html

查看所有标签

数学拾遗

数学拾遗

加黑蒂 / 清华大学出版社 / 2004-8 / 49.00元

Beginning graduate students in mathematics and other quantitative subjects are expected to have a daunting breadth of mathematical knowledge ,but few have such a backgroud .This book will help stedent......一起来看看 《数学拾遗》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具