Syntax
Python Write a Comment Syntax
In Python, write a comment: adds a comment that Python ignores — # comment
Quick Answer
- Syntax
# comment
PythonSyntax
Write a Comment
Adds a comment that Python ignores.
How to write a comment in Python
- Open your Python file or editor.
- Copy the example, then replace its sample names and values for your code.
Python Write a Comment Syntax
Use # comment.
Related Syntax References
Frequently asked questions
What is the Python syntax for write a comment?
Use this pattern: # comment
Can I copy this Python code example?
Yes. Use Copy code and adapt the example to your program.
Is this Python syntax different on Mac or Windows?
No. The language syntax is the same across operating systems.
Official source · How we verify