What Is Variable

Q

What is variable in Python?

✍: FYIcenter.com

A

A variable is symbolic name that can be assigned with a reference link to a data object resulted from an expression.

In Python, variables are not declared specifically for any data type. They can be used without declaration statements. For example, the following assignment statements defines variable "x" and assigned with an "int" object first, then changed to a "float" object:

>>> x = 1234
>>> x
1234
>>> x = 3.14159
>>> x
3.14159

Variable names must start with alphabetical letters or "_". For example, some invalid variable names are listed below:

3x 
"x"
.com

 

Expressions, Variables and Assignment Statements

⇒⇒Python Tutorials

2017-09-09, 120👍, 0💬