Constants in Python:
Defn: A constant is similar to a variable but its value can not be modified or changed in the course of the program execution.
The constant concept is not applicable in Python. It is possible in Java, C++ and C languages.
But A developer can indicate a variable as constant by writing its name in all upper case letters.
For our convenience, we use uppercase characters. Defining constant is not possible in Python
Example:
In mathematics, 'PI' value is 3.1714 which never changes and it is constant.
PI=3.1714 #It is just convention but we can change the value.
Nice article thanks for given this information. I hope it useful to many People
ReplyDeletePython Course in Hyderabad
Python Institute in Hyderabad
Python Online Training in Hyderabad
Python Training in Hyderabad
Python Training
Python Online Training