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.

Level: beginnerTopic: Python core

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.