What is a private method?



What is a private method?..

Answer / Ambika Varun

In Python, a private method is a method that is meant to be accessible only within the class in which it was defined. To make a method private, you can prefix its name with a single underscore (e.g., _my_method).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Explain me what is unittest in python?

1 Answers  


What are python packages?

1 Answers  


Explain the uses of the modules sqlite3, ctypes, pickle, traceback, and itertools.

1 Answers  


Why python is best for data science?

1 Answers  


How do you include a string in python?

1 Answers  


Where is python in anaconda?

1 Answers  


Tell me why and when do you use generators in python?

1 Answers  


What are tuples used for?

1 Answers  


Write a program to produce fibonacci series in python.

1 Answers  


How do you debug a program in python? Answer in brief.

1 Answers  


What is the usage of enumerate () function in python?

1 Answers  


What is yaml file in python?

1 Answers  


Categories