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 77 views
1 answer 66 views
1 answer 75 views
1 answer 78 views
1 answer 59 views
...