Technical Roadmap

Variables in Python

A variable is a reserved location in memory where we store our values. You can think of a variable as a label attached to an object or value. Using that label we can access those values stored in our computer's memory.

The Logicoria Tip

Variable is a memory location that holds our values or data.

In the program below, we made a variable num and stored 20 in it

PYTHON
# A variable named num
num= 20
print(num)

Output

20

Try: Change the name and value of the variable in the above program and see output

Quick Revision

  • Variable is a memory location
  • It is attached to an object
  • It stores values

Related Articles