AI engineering glossary · Python core

What is constant?

Constant: A value that is not meant to change during a program. Python has no enforced constants, so by convention the name is written in uppercase, such as MAX_RETRIES, and treated as read-only.

Level: beginnerTopic: Python core

Constant: an example

GST_RATE = 0.18 at the top of a file signals to readers that the value should not be reassigned.

Related terms

More Python core terms

Where you learn it

Constant 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.