单行注释
Python中单行注释以#开头,实例如下:
#这是单行注释 print("hello world")#这是单行注释运行结果
hello world
多行注释
多行注释可以用多个#号,还有”’和”“”
#第一个注释
#第二个注释
'''
第三个注释
第四个注释
'''
"""
第五个注释
第六个注释
"""
print("hello world")
运行结果
hello world
单行注释
Python中单行注释以#开头,实例如下:
#这是单行注释 print("hello world")#这是单行注释运行结果
hello world
多行注释
多行注释可以用多个#号,还有”’和”“”
#第一个注释
#第二个注释
'''
第三个注释
第四个注释
'''
"""
第五个注释
第六个注释
"""
print("hello world")
运行结果
hello world
1955
4460

被折叠的 条评论
为什么被折叠?