Skip to content

Comments

add a comments to a code is to explain or describe the usage of the code, while the comments itself will not involved on execution

1. Single line comments

comments.py

python
# This is a single line comments
print("Hello, World !") # It can exist here too

2. Multiple line comments

  • multiple line comments allow use to change row

comments.py

python
"""
This is the first line comments
This is the second line comments
I wont involved on the proggrame
"""
print("Hola !")

Results:

Hello, World !
Hola !