1
2brightness_4
3class Example:
4 def __init__(self):
5 print("Instance Created")
6
7 # Defining __call__ method
8 def __call__(self):
9 print("Instance is called via special method")
10
11# Instance created
12e = Example()
13
14# __call__ method will be called
15e()