About 50 results
Open links in new tab
  1. 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 …

  2. Multiple line comment in Python - Stack Overflow

    Jan 21, 2014 · 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.

  3. python - Is there a way to put comments in multiline code ... - Stack ...

    Jul 13, 2013 · Python way is with # on every line if you want to comments something or for inline comments everything after # is ignored. If you really want to comment a multiline statement that is …

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

    Feb 8, 2022 · In Corey Schafer's Programming Terms: Mutable vs Immutable, at 3:06, he selected multiple lines and commented them out in PyCharm all in one action. What is this action? Is it a built …

  5. Python multiline comments - Stack Overflow

    Aug 19, 2021 · It is similar to regular strings in python but it allows the string to be multi-line. You will find no official reference for triple quoted strings to be a comment.

  6. Why doesn't Python have multiline comments? - Stack Overflow

    Dec 29, 2008 · Multi-line comments aren't inherently breakable; it's just that most implementations of them are (including Python's). The obvious way to do multi-line comments in Python, to my mind, is …

  7. What's the PEP8 / best practice for Python multiline comments?

    Nov 16, 2019 · Docstrings are conventionally multiline strings, so can be extended to multiple lines as required. For example, here's a class whose attributes I've documented with docstrings, allowing this …

  8. 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 in triple quotes: """.

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

  10. syntax - What is the difference between multi-line comment and multi ...

    What you are doing by using multiline strings as comments is exactly the same as using a number in random places: `do_something; 42; do_something_else'. Python evaluates the expression but since …