Then `MyClass.i` and `MyClass.f` are valid attribute references, returning an integer and a function object, respectively.
Class attributes can also be assigned to, so you can change the value of `MyClass.i` by assignment. `__doc__` is also a valid attribute, returning the docstring belonging to the class: `"A simple example class"`.
Class instantiation uses function notation. Just pretend that the class object is a parameterless function that returns a new instance of the class. For example (assuming the above class):
```python
x = MyClass()
```
Creates a new instance of the class and assigns this object to the local variable x.
Every programming language which follows OOPs (Object Oriented Programming) concept has some mechanism of data hiding.In python if some variable needs to be hidden from the outside world we use the concept of private variables by using `__` before he variable name.
for example:
```
class Foo:
def __init__(self):
self.__privatenum = 3011
Now if we try to access __privatenum outside the class we will get error:
x = Foo()
x.__privatenum # gives following error : 'Foo' object has no attribute '__privatenum'