Constant

say it: “KON-stunt” /ˈkɑnstənt/

A value that should never change, named in ALL CAPS so everyone leaves it alone.

What is a constant in Python?

A constant is a value that shouldn't change while the program runs. Python won't stop you changing it; naming it in ALL CAPS tells everyone to leave it alone.

SALES_TAX = 0.07
price = 20
print(price + price * SALES_TAX)  # 21.4

Level: Novice · More Python terms at this level

Updated

In other subjects