Unit-1_PythonVariables
Unit-1_PythonVariables
types
INTRODUCTION OF PYTHON VARIABLES…
• VARIABLE IS A NAME THAT IS USED TO REFER TO THE
MEMORY LOCATION
• PYTHON VARIABLE IS ALSO KNOWN AS IDENTIFIER TO USED
TO HOLD THE VALUE
• PYTHON VARIABLE NAMES CAN BE GROUP OF BOTH OF
LETTER AND DIGITS
• USE LOWER CASE LETTER AND UPPER CASE LETTER ARE
DIFFERENT LIKE RAHUL AND RAHUL
• THEY USE THE UNDERSCORE THE VARIABLE LIKE (_A) &
(A_)
Python variables
► Identifier name must not use any white space and special character
(!,@,#,%)
► Identifier name must not be similar any keyword
► Identifier name are case sensitive for example :- NAME and name are
the different name not a same variable
► Example of valid identifier name is :- _a,a123 etc
declaring variables
A=10
B=10
C=A+B
Print(c)
Example of variable
Name=“sourav”
Age=23
Salary=21500
print(Name)
print(Age)
print(Salary)
Or
Print(Name,Age,Salary)
Multiple Assignment
User assign the multiple variable and assign the single value to multiple variable
Like a and b and c variables value is 100
And next step is print the all values
Assigning multiple values to
multiple variables
● Example:-
a,b,c=10,20,30
print(a)
print(b)
print(c)
User assign the multiple variable and assign the multiple value
And second step print the all values
Deleting variables
I print the variable x and assign the value and print the value after printing the value Delete
the variable x