create an instance method python code example

Example 1: what is a ython instance

An object belonging to a class. e.g. if you had an Employee class, each 
individual employee would be an instance of the Employee class

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!