0

I am trying to figure out a way of declaring a variable whose value can not be changed in any way (static in c++), but in python3. Please let me know how.

asked Nov 19, 2017 at 4:32
3
  • 3
    Possible duplicate of Static class variables in Python Commented Nov 19, 2017 at 4:36
  • 3
    IIRC this is not what "static" means in c++. Sounds like what you're looking for is something similar to Java's final keyword. AFAIK there is no such thing in Python Commented Nov 19, 2017 at 4:36
  • 1
    Possible duplicate of how to set global const variables in python Commented Nov 19, 2017 at 4:50

1 Answer 1

3

there is no way of creating a const variable in python3, but there are some option and recommendation too, check the link below- how to set global const variables in python

answered Nov 19, 2017 at 4:41

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.