
Python Variables
Python Variables
1. Variables are named location to store a data in a memory location
Name = “Dhoni” |
2. Python is type inferred, so by default it identifies the type of the data stored.
Example :
Name = “Kohli” Name = “Dhoni” print(Name) |
3. We can assign more than one variable in a single line statement with corresponding data
Name,age,team = “Dhoni”,37,”CSK” |
4. If we want to create a constant values, do follow the below coding standard
Import constant TEAM = “CSK” Print(constant.TEAM) |
Rules to be followed:
- Give capital letters for all the constant variable declaration
- Use meaningful name for the variable declaration.
- Never use special characters or numbers