Comments
Comments are notes in your code that Python ignores. They help explain what your code does.
Single-Line Comments
Use # for single-line comments:
Loading Python Playground...
Multi-Line Comments
For longer explanations, use multiple # or triple quotes:
Loading Python Playground...
Exercises
Loading Python Exercise...
Loading Python Exercise...
When to Use Comments
Good comments explain why, not what:
Loading Python Playground...
Practice Playground
Loading Python Playground...
Key Takeaways
- Use
#for single-line comments - Comments are ignored by Python
- Good comments explain why, not what
- Use comments to temporarily disable code
- Triple quotes can be used for multi-line documentation

