Python - Encapsulation and Data Protection
Which of the following is the correct way to define a protected attribute named
_count inside a Python class?_count inside a Python class?self._count is correct.self.count is public, self.__count is private, and count = 0 is a local variable, not an attribute.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions