Variable in python – tutorial # 1
first program in python – tutorial # 1
Video about variables in python
Variable are temporary place to store data and perform operations on data stored. You can do any manipulation.
Variable has 2 parts
- Variable name ( before equal – Left side)
- variable value (after equal – Right side)
variable_name = "Hello"
How to print variable?
It is very very easy. Just use the variable in print
print(variable_name)
Now run the code in terminal and Boom it will work.
Source Code
variable_name = "Hello" # 2nd variable person_name = "Khan" # Now I will print my variable # No need to make big big variable names :P print(variable_name) # lets print 2nd variable print(person_name) # Let run the program in terminal # I want to change my variable name # Lets run again.