Python Variables are nothing but the reserved memory locations to store the values. In other words, it is the name of the memory location where the data is stored. And if once the variable is stored a separate space is allocated in the memory. Moreover, we can define the variable name using the combination of letters, number, and underscore.
Click the here to know the programming structure of python
Assigning values to the variables :
In fact, there is no explicit declaration to store the memory. And we can easily define a variable using the ‘=’operator.
a = 20
b = 30
Beside python online training suggest another type of declaring the variables.
a,b,c = 2,10,python
Python interpreter automatically identifies the types of variables
Can we re-declare a variable?
Today many starters have this question? Hope you got the answer after reading this. And the answer to the question is yes, we can re declare a variable. But the Variable stores the most recent value.
x = ‘10’
These are fixed values that cannot be altered.
Ex : pi= 22.7
Place these values separate files like constant.py
Now we can execute this by the following command
So after running this command, we would get the following output
Willing to get certified on it Courses? Visit OnlineITGuru for Online Certification Courses
So till we seen the variable types, declarations. Now, its time to discuss tokens