In python, what is the difference between protected and public variable in a class
class A:
def __init__(self):
self._protected="protected"
self.__private="private"
self.public="public"
>>> a = A()
>>> a.public
'public'
>>> a._protected
'protected'
>>>
Can someone please explain me the difference, and guide me on how to use protected variable in python [In case my method is usage is false]
Thanks in Advance.