Tanishk
asked

Expert
Sarthak Baral answered
Hi there!
In Python, comments are notes in your code that the interpreter ignores, used to explain what your code does for yourself or others.
For example:
# This is a comment and won't affect the code
print(34.0) # This prints the temperature
In this case, Python will just run the `print(34.0)` line and ignore the comment that explains it.
Hope this helps!
Python
This question was asked as part of the Learn Python Basics course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer