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 204 views
1 answer 149 views
1 answer 169 views
1 answer 161 views
1 answer 144 views
1 answer 167 views
1 answer 149 views
...