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

 

What Is Assignment Statement

Evaluation of Expressions

Expressions, Variables and Assignment Statements

⇑⇑ Python Tutorials

2018-03-13, 1312🔥, 0💬