Python Comments

Chapter: Python Last Updated: 22-09-2018 08:03:29 UTC

Program:

            /* ............... START ............... */
                
# This is a single line comment

print('Python comments example program ')

# Python Multiline comments Example

''' This 
    Is 
    Multiline comments
    
    '''

                /* ............... END ............... */
        

Output

Python comments example program

Notes:

  • In Python there are two types of comments single line comment and multiline comments.
  • In single line comment before comments start we use "#" symbol for mentioning the comments.
  • For Multiline comment we can start the comment by giving the text inside triple quotes ' ' '.
  • In the above program you can see that single line comment at the top and multiline comments at the bottom.

Tags

Python Comment Example, Single line comment, multiline comments, How to comment python, python comments block, python comment syntax, how to create multiline comments in python

Similar Programs Chapter Last Updated
Python Variables Python 21-09-2018
Python String Contains Python 15-09-2018
String In Python Python 22-09-2018
Python Switch Statement Python 20-09-2018
Python Function Example Python 14-09-2018
Python If Statement Python 14-09-2018
Area Of Triangle In Python Python 14-09-2018
Python Square Root Python 22-09-2018
Add Two Numbers In Python Python 13-09-2018
Python Hello World Python 14-09-2018

1