Variables
Variables is a container which stores the values in it. Every values in Python has a datatype. Datatypes in Python are numbers, list, tuple, strings, dictionary etc.
Rules for Python Variables
- A Variable name can contain alpha-numeric characters and underscores (A - Z , a - z, _).
- A Variable name can start with number or underscore character, but can' t start with a number.
- Variable name should not be keywords. Keywords are some specific names that are used in Python for some specific function.
- Variable names in Python are case sensitive. (Height, height, HEIGHT are different).
Variable Declaration
Here we didn't defined data type , as we know Python is dynamically typed so not required to define explicitly.
Multiple Variable Declaration
We can declare multiple variables in a single statements. And you can initialize multiple variables with
the same value.
Comments
Post a Comment