My Visual Studio Code comment Python code with ''' instead of using # when I try to comment a block of code with the key combination Ctrl + Shift + a.
I'm using Ubuntu 16.04.
My Visual Studio Code comment Python code with ''' instead of using # when I try to comment a block of code with the key combination Ctrl + Shift + a.
I'm using Ubuntu 16.04.
For VS Code and Python,
Select the block of code
To Comment press: Ctrl + k + u
To Uncomment press: Ctrl + k + u
This has nothing specifically to to with Visual Studio, but a result of the python commenting styles. Generally, single line comments are done with the pound (or hash) symbol:
# This is a comment
In contrast, three quotation marks (either ''' or """) can be used to easily produce multi-line comments.
'''
This is also a comment.
However, this comment crosses multiple lines
'''
or
"""
This is yet another multiline comment
For long comments the quotation marks are much easier than # comments.
"""
Hope this helps.
I found a solution at KINDA CODE.