About 110,000 results
Open links in new tab
  1. How to comment out a block of code in Python [duplicate]

    Is there a mechanism to comment out large blocks of Python code? Right now, the only ways I can see of commenting out code are to either start every line with a #, or to enclose the code …

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

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

  4. How to "comment-out" (add comment) in a batch/cmd?

    I have a batch file that runs several python scripts that do table modifications. I want to have users comment out the 1-2 python scripts that they don't want to run, rather than removing them fr...

  5. syntax - Mid-line comment in Python? - Stack Overflow

    Mar 6, 2015 · 89 I'm wondering if there is any way to comment out part of a line, like you can do in c++ with /*this*/. The only comments I know about are # this which always goes to the end of …

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

  7. How to write an inline-comment in Python - Stack Overflow

    Dec 15, 2019 · No, there are no inline comments in Python. From the documentation: A comment starts with a hash character (#) that is not part of a string literal, and ends at the end of the …

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

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

  10. ipython - jupyter - how to comment out cells? - Stack Overflow

    Sep 8, 2015 · 40 Is it possible to comment out whole cells in jupyter? I need it for this case: I have a lot of cells, and I want to run all of them, except for a few of them. I like it that my code is …