Python class function on initiation code example

Example 1: what is init class python

The __init__ function serves two main purposes. 
The first is its used as a tool to pass 
arguments inside of it but the difference is you can spread those
arguments to other functions located in the same class. 
To do this you would place the word (self.) keyword in another function 
followed by the arguments name. This allows the argument to be spread 
down to that function. 
The second purpose is it allows you to pass arguments to a 
class when calling the class. Without this function inside the class
when you call the class no arguments would be able to go inside getting
nothing in return.

Example 2: call instance class python

# define class
class example:
# define __call__ function
   def __call__(self):
       print("It worked!")
# create instance
g = example()
# when attempting to call instance of class it will call the __class method
g()
# prints It worked!