A constant is an identifier whose value cannot be changed throughout the execution of a program whereas the variable value keeps on changing.
There are no constants in Python, the way they exist in C and Java.
In Python, It is not possible to define constant whose value can not be changed.
In Python, Constants are usually defined on a module level and written in all capital letters with underscores separating words but remember its value can be changed.
Ex:-
PI
TOTAL
MIN_VALUE
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 1 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 2 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 3 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 4 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 5 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 6 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 7 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 8 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 9 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 10 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 11 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 12 out 13 — By DevOpsSchool
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Python Advanced Programming Tutorials and Networking Part 13 out 13 — By DevOpsSchool
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
Latest posts by Rajesh Kumar (see all)
- How to remove sensitive warning from ms office powerpoint - July 14, 2024
- AIOps and DevOps: A Powerful Duo for Modern IT Operations - July 14, 2024
- Leveraging DevOps and AI Together: Benefits and Synergies - July 14, 2024