Variables in Python
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 wit
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
📰 Read the original article on Dev.to WebDev
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.