Python variable type
In this chapter we learn python veritable and you can store integers, decimals or characters in these variables.
Creating Python variable
The equal sign(=) used to assign value to variables.
Python Python variables do not need explicit declaration to reserve memory space.
X=1 Y="Mac" print(X) print(Y)Result:
Variable start with letter and underscore character.
Variable can't started with number
More advance example variable
combined with text and variable
print("Python is + X")
If you combine with a string and a number what will be answer
x = 2 y = "Mac" print(x + y)