>A Byte of Python

Variables

Using just literal constants can soon become boring - we need some way of storing some information and manipulate that information. This is where variables come into the picture. Variables are exactly what they mean - their value can vary i.e. you can store anything in a variable. Variables are just parts of your computer's memory where you store some information. Unlike literal constants, you need some method of accessing these variables i.e. you give them names.

Remember, Python refers to anything used in a program as an object. This is meant in the generic sense. Instead of saying "the something that we have", we say "the object that we have" .

We will now see how to use variables along with literal constants. Save the following example and run the program.