This page topics close

Comments in Python are the lines which are ignored by the Python interpreter. In Python a hash sign (#) that is not inside a string literal is the beginning of a comment. All characters after the #, up to the end of the physical line, are part of the comment .

  • Example of python comments

    #...............line of comments

    Example)
    drag_handle
     #This is my first python program
    print("Hello python")
    #This is comment in python 
    #Now I am going to print my name
    print("My name is durgesh")
    Output:
    Hello python
    My name is durgesh

What next?

The next topic is Python Literals

Share this page