Computer Science, asked by zoyakhan6994, 1 year ago

How do we access class attributes using dot operator in Python?

Answers

Answered by Student213
0

Well in every method inside a Python class, self is used as the reference to the object of the class. It is included in a function as a first parameter. When the function defined inside a class is invoked, self refers to the object of the class. We do not need to pass self as argument while calling the function.

Similar questions