Gre*_*reg 17
我想你在谈论评论?
有简单的评论,开头是#:
return sys.stdin.readline() # This is a comment
Run Code Online (Sandbox Code Playgroud)
还有Docstrings,它记录模块,类,方法和功能:
def getline():
"""This is a docstring"""
return sys.stdin.readline()
Run Code Online (Sandbox Code Playgroud)
与许多其他语言不同,Python没有多行注释语法(尽管docstrings可以是多行的).