How to declare a constant string in Python

1 Answer

0 votes
# Declare a constant string
MY_CONSTANT_STRING = "ABC" # Python does not enforce immutability for constants

print(MY_CONSTANT_STRING)



'''
run:

ABC

'''

 



answered Jun 19, 2025 by avibootz

Related questions

1 answer 202 views
1 answer 147 views
1 answer 168 views
1 answer 155 views
1 answer 142 views
1 answer 162 views
1 answer 146 views
...