In Python, there is no true constant variable but you can simulate constant behavior using uppercase variable names to indicate to other programmers that the variable should not be changed.
FILE_SIZE_LIMIT = 2000
The constant variable holds values, which cannot be changed.
Python constant variable example
A simple example code defines a constant
PI like this.
PI = 3.14159
Do comment if you have any doubts or suggestions on this Python constant topic.
Note: IDE: PyCharm 2021.3.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.