Python Variables
A variable is a name that refers to a value.
Creating Variables
Python does not require a separate variable declaration.
name = "Aradhya"
age = 21
price = 99.5
Variable Naming Rules
- Start with a letter or underscore
- Do not start with a number
- Use letters, numbers and underscores
- Names are case-sensitive
- Do not use Python keywords
Multiple Assignment
You can assign multiple values in one statement.
name, age, city = "Aradhya", 21, "Indore"
Dynamic Typing
A Python variable can refer to values of different types during execution.
value = 10
value = "Python"