0d: 00h: 00m: 00s

🎁 Get 3 extra months of learning — completely FREE

That's 90 extra days to master new skills, build more projects, and land your dream job.

Become a PRO
Background Image

🎁 Get 3 extra months of learning completely FREE

Become a PRO
Tanishk Singh
5 months ago
Tanishkcountry asked

What are comments in Python?

Sarthak Baral
Expert
5 months ago
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.