About 50,200 results
Open links in new tab
  1. How do I create multiline comments in Python? - Stack Overflow

    30 AFAIK, Python doesn't have block comments. For commenting individual lines, you can use the # character. If you are using Notepad++, there is a shortcut for block commenting. I'm sure others like gVim and Emacs have similar features.

  2. How to comment out a block of code in Python [duplicate]

    6 In Eclipse + PyDev, Python block commenting is similar to Eclipse Java block commenting; select the lines you want to comment and use Ctrl + / to comment. To uncomment a commented block, do the same thing.

  3. Is there a shortcut to comment multiple lines in python using VS …

    Sep 26, 2022 · Instead of indivually typing out a hash tag in front of each line, is there a way to select a block of code and comment/uncomment everything by only pressing a couple shortcut keys?

  4. What is the proper way to comment functions in Python?

    Mar 2, 2010 · Watch out for excessive ASCII art. Having long strings of hashes may seem to make the comments easier to read, but they can be annoying to deal with when comments change Take advantage of language features that provide 'auto documentation', i.e., docstrings in Python, POD in Perl, and Javadoc in Java

  5. python - Comment/Uncomment multiple lines in …

    May 12, 2021 · CTRL+/ for comment and uncomment multiple lines you can press 'h' anywhere in command mode, you can find all the shortcuts of jupyter.

  6. python - What is the shortcut key to comment multiple lines using ...

    Feb 8, 2022 · This heavily depends on where you're writing your python code. If you're writing it in Notepad, there won't be a shortcut for commenting a line. However, if you use an IDE, you will probably have such capability alongside the ability to change the shortcut. Just search Google for keyboard shortcuts for your preferred IDE.

  7. comments - Commenting code in Notepad++ - Stack Overflow

    Sep 15, 2017 · Actually, I wanted to block comment my code written in Python or in fact any other language, in Notepad++ editor. May be that was not quite clear from my question. But Niels's and other answers helped.

  8. Shortcut to comment out multiple lines with Python Tools for …

    May 30, 2011 · You misunderstand the question. Most Python editors provide a simple mechanism for adding # to multiple lines at once. I'm asking if Python Tools for Visual Studio provides such a mechanism.

  9. How can I comment multiple lines in Visual Studio Code?

    For python code, the "comment block" command Alt + Shift + A actually wraps the selected text in a multiline string, whereas Ctrl + / is the way to toggle any type of comment (including a "block" comment as asked here).

  10. Shortcut key for commenting out lines of Python code in Spyder

    Apr 15, 2016 · I recently changed from the Enthought Canopy Python distribution to Anaconda, which includes the Spyder IDE. In Canopy's code editor, it was possible to comment and uncomment lines of code by pressing the "Cntrl+/" shortcut key sequence.