Does python has private keyword in python ? How to make any variable private in python ?



Does python has private keyword in python ? How to make any variable private in python ?..

Answer / Greesh Kumar Sharma

Python does not have a built-in 'private' keyword. However, a naming convention is followed where single underscores (_) before an attribute or method name indicates that it should be considered as internal implementation detail and should not be accessed directly by the users of the class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is Java implementation of Python popularly know?

1 Answers  


What is setuptools in python?

1 Answers  


What is setup py in python?

1 Answers  


Does python have a built in function for string natural sort?

1 Answers  


Does python require coding?

1 Answers  


How do I get a list of all files (and directories) in a given directory in Python?

1 Answers  


Explain about negative indexing?

1 Answers  


Explain polymorphism in Python.

3 Answers  


What exactly is SVM?

2 Answers  


What are the possible ways to load an array from a text data file in python? How can the efficiency of the code to load data file be improved?

1 Answers  


Why do we need break and continue in python?

1 Answers  


Explain the database connection in python flask?

1 Answers  


Categories