我的视觉工作室代码注释python代码与'''
而不是使用#
尝试用密钥组合ctrl + shift + a
注释代码块。我有ubuntu 16.04
这与Visual Studio没有任何关系,但是python注释样式的结果。通常,单行注释使用井号(或哈希)符号完成:
# This is a comment
相反,可以使用三个引号(“'”或“”“)来轻松生成多行注释。
'''
This is also a comment.
However, this comment crosses multiple lines
'''
要么
"""
This is yet another multiline comment
For long comments the quotation marks are much easier than # comments.
"""
希望这可以帮助。
在Windows环境下,这对我有用: