What is the shortcut to comment out multiple lines with Python Tools for Visual Studio?
If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code. Ctrl+K+U will uncomment the code.
To comment out multiple lines in Python, you can prepend each line with a hash ( # ).
Windows: Ctrl + K + U. Mac: Command + K + U.
If you want to comment out any line in python (when using visual code) then the shortcut is: Ctrl + / (control button plus forward slash)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With