你如何在python中进行块注释?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43520811/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 23:09:45 来源:igfitidea点击:
How do you make a block comment in python?
提问by D.Alkhovik
I have tried using triple quotes but it only turns the code green. As if i were to print it. Not red
我曾尝试使用三重引号,但它只会使代码变绿。好像我要打印它一样。不红
"""
How do i make a block comment
"""
So how can i make a block comment, or is it supposed to be green.
那么我如何才能进行块评论,或者它应该是绿色的。
回答by WilomGfx
'''
This is a multiline
comment. I can type here whatever I want.
'''
回答by Alastair McCormack
You have too many quotes in the closing line - you have 4. It should be 3
您在结束行中有太多引号 - 您有 4 个。应该是 3 个