Variables
What are variables?
# In this example, the variable x is created and assigned the value 10.
# You can then use the variable x in your program like this:
variable = 1
# You can also assign a new value to a variable using
# the assignment operator (=). For example:
variable = 2
# A variable with a type hint
variable_with_type: int = 1
print(variable_with_type) # print the result of our variableVariable Rules in Python
Last updated