About 1,580,000 results
Open links in new tab
  1. What is the proper way to comment functions in Python?

    Mar 2, 2010 · The correct way to do it is to provide a docstring. That way, help(add) will also spit out your comment.

  2. Is there a shortcut to comment multiple lines in python using VS Code ...

    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?

  3. How do I create multiline comments in Python? - Stack Overflow

    111 Python does have a multiline string/comment syntax in the sense that unless used as docstrings, multiline strings generate no bytecode -- just like # -prepended comments. In effect, it acts exactly …

  4. python - Comment/Uncomment multiple lines in JupyterNotebook …

    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.

  5. What is the proper way to comment code in Python? [closed]

    What is the proper way to comment code in Python? [closed] Asked 12 years, 11 months ago Modified 1 year ago Viewed 26k times

  6. 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 …

  7. 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 …

  8. python - What is the keyboard shortcut for comments in IDLE? - Stack ...

    Jun 17, 2021 · For commenting a line, bring the cursor to the line that you want to comment and press Alt+4. To uncomment an existing comment, press Alt+3. The comment/uncomment options are …

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

    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 …

  10. Shortcut to comment out multiple lines with Python Tools for Visual ...

    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 …