print(__doc__)

"""hello"""
"""world"""
#helloworld
print(__doc__)
"""hahahah"""
print(__doc__)

输出
在这里插入图片描述
print(__doc__)语句的作用是:打印该语句前面但离得最近的那个大段注释(也叫说明文档)。""""""范围内的叫做大段注释,#是单行注释。

猜你喜欢

转载自blog.csdn.net/qq_43391414/article/details/112348819
doc