3 ms·
Python doesn't have constants at the language level. You can create classes without setter properties, only getter properties, to have constant objects. This is
by SAI_Peregrinus 1y ago
Python doesn't have constants at the language level. You can create classes without setter properties, only getter properties, to have constant objects. This is rare, usually people just write the name in SCREAMING_SNAKE_CASE to document it's supposed to be a constant but Python will still allow mutating it.