Python Programming - Encapsulation - Discussion
Discussion Forum : Encapsulation - General Questions (Q.No. 2)
2.
Which access specifier in Python is used to indicate that a variable or method should only be accessed within the same class?
Answer: Option
Explanation:
Private access specifier in Python is denoted by a single underscore (
_
), and it indicates that the variable or method should only be accessed within the same class.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers