Variables
- Variables are the containers that stored a value in memory, acting as a container for data.
- A variable is created when you assign a value to it using the assignment operator.
- Variable name must start with a letter or underscore.It cannot start with a number.
- Variables are case-sensitive. E.X: Name, name - these are two different variables.
- single and multiple value can be assigned to a variable in Python.
- Variables are also known as Identifiers in Python.
Example of variable creation and dynamic typing
x = 10 # x is an integer
x = "Hello" # x is now a string
print(x) # Output: Hello
Top comments (0)