Articles → Python → Comments In Python

Comments In Python






What Are The Comments?






# Comments




Picture showing the sample python code with comments

Click to Enlarge




How Do Comment And Uncomment Multiple Lines?




  1. Select the lines you want to comment
  2. Go to Format → Comment Out Region
Picture showing the comment out region menu in IDLE

Click to Enlarge



  1. Select the lines you want to comment
  2. Go to Format → Uncomment Region
Picture showing the Uncomment region menu in IDLE

Click to Enlarge


Multiline Comments




print("This is the multiline comment")

'''
print("This line will not get printed")
'''




Picture showing the multiline comment in python

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, January 28, 2019
 
Updated On  -  Wednesday, May 15, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250