Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut to comment out multiple lines with Python Tools for Visual Studio

What is the shortcut to comment out multiple lines with Python Tools for Visual Studio?

like image 248
Johan Råde Avatar asked May 30 '11 06:05

Johan Råde


People also ask

How do I quickly comment out code in Visual Studio Python?

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.

How do you comment out multiple lines of code in Python?

To comment out multiple lines in Python, you can prepend each line with a hash ( # ).

How do you comment multiple lines in VS code at once?

Windows: Ctrl + K + U. Mac: Command + K + U.


1 Answers

If you want to comment out any line in python (when using visual code) then the shortcut is: Ctrl + / (control button plus forward slash)

like image 112
Priya Kulkarni Avatar answered Sep 23 '22 14:09

Priya Kulkarni