HomePagev2 Forums Python Discussions Pop Quiz: Python Comments


  • Pop Quiz: Python Comments

  • Trever Ehrlich

    September 3, 2020 at 1:49 am

    How do you do comments in Python?

    1. /* comment here */
    2. // comment here
    3. # comment here

    Which one is it?

  • Sai Gowtham Babu AMBURI Gowtham Babu AMBURI

    September 10, 2020 at 4:43 am

    We can use

    /* */ for using comments in SQL

    // are used in Java

    # as comments in python

    a comment is used as a free text which is used by the human to write his understandings of the code. But a comment is not understood by computer.



  • Badri Rajasekhar Reddy Rajasekhar Reddy

    September 10, 2020 at 6:51 am

    # is used for Single-line comments in python
    <p style=”text-align: left;”>For example: </p>
    print("Hello World")

    #output:Hello World 

    ”'(Triple quotes) are used for Multi-line comments in python

    For example:

    print("Hello World")


    output: Hello World




    September 11, 2020 at 5:40 am


    # is used for single-line comments in python.

    ”’ ”'(triple single quotes) or “”” “””(triple double quotes)  are used for multi lines of comment block

    Comments are used to understand the code which is not understood by computer. These are very useful. By these comments anyone can understand that code easily.

Log in to reply.

Original Post
0 of 0 posts June 2018