AI engineering glossary · Python core
What is comment?
Comment: Text in a source file that the interpreter ignores, started with the # symbol and running to the end of the line. Comments explain why code does something for future readers. They should add reasoning, not repeat what the code obviously does.
Comment: an example
# convert paise to rupees on its own line, or total = paise / 100 # rupees after the code.
Related terms
More Python core terms
- Comparison operator
- Conditional expression
- Constant
- continue
- Data type
- Debugging
- Deep copy
- Default argument
Where you learn it
Comment is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.