What is data hiding in python?
Answer / Bhoopendar Singh
Data hiding in Python refers to the practice of encapsulating or hiding class data (variables) from external access, limiting it to specific methods within the class. This helps promote modularity and protects data integrity. In Python, this can be achieved by defining variables as private instance variables (using double underscores, e.g., _variable_name).
| Is This Answer Correct ? | 0 Yes | 0 No |
What does __name__=='__main__' in python mean?
What is the iterator protocol?
What is the output of the following code and why?
Write a program to check given number is prime using for loop with else?
How do I start learning python?
How do you handle exceptions with try/except/finally in python?
What is meant by r strip() in python?
Why python is used?
Are methods objects in python?
What are the tools that help to find bugs or perform analysis?
What is tkinter?
How do you debug a program in python? Is it possible to step through python code?