Python Online Training In Andhra Pradesh and Telangana
9010519704
Opening Hours :7AM to 9PM
Python Constant
Constant:
Constant is an identifier whose value can not be changed.In Python language these constants are classified into following types
1.Numerical constants
2.Character constants
Numerical Constants:
Numerical means numbers .these are classified into 2 types
1.Integer constants
2.Real constants
Integer Constants:
Integer constants means + or - numbers. Example:
x=10;
y=-10
Real Constants:
Real constants means floating values or decimal values. Example:
x=10.0;
Character Constants:
These are classified into fallowing types
1.Single character constants
2.String character constants
Single Character Constants:
If any character or symbol or number enclosed with single quotation. Example:
x='a';
x='2';
x='@';
String Character Constants:
Group of characters or symbols or numbers enclosed with double quotation. Example:
s1="abc";
s2="@##$";
s3="123";