What are global, protected and private attributes in Python?
Vishalini.R Answered question June 14, 2023
To refresh your memory, private means that the attribute/method can only be utilized within the class in which it is defined. The attribute/method is protected if it can only be used in the class where it is defined or its subclasses.
A protected attribute can be accessed both within the class that defines it and within classes that are derived from it (for example, that class’s children). A private attribute can only be accessed within the class that defines it.
Vishalini.R Answered question June 14, 2023
