Python Variables

Variables are essentially a name attached to a specific Python object that is stored in memory. Once the object has been assigned to the variable, the program can interact with the object through referencing the name. Unlike other programming languages, a variable in Python doesn’t need to be explicitly declared before using. For example, a variable called “x” can be created and assigned when needed.

x = 10

The above variable, “x”, is assigned a value of 10.

Python Variable Names

TIP