Variable

noun

say it: “VAIR-ee-uh-bul” /ˈvɛəriəbəl/

A name that holds a value in a program, like a labeled box: use the name to get the value back, or put a new value in.

What is a variable in Python?

A variable is a name that holds a value, like a labelled box. Use the name to get the value back, or put a new value in the box.

score = 0
score = score + 10
print(score)  # 10

In a sentence

  • “Store the user's answer in a variable so you can use it later.”
  • “The variable score starts at 0 and goes up by 10 each round.”

Level: Novice · More Python terms at this level

Updated

In other subjects