'common base class for all employeesempcount def __init__(selfnamesalary)self name name self salary salary employee empcount + def displaycount(self)print "total employee %demployee empcount def displayemployee(self)print "name "self name"salary"self salary he variable empcount is class variable whose value would be shared among all instances of this class his can be accessed as employee empcount from inside the class or outside the class he first method __init__(is special methodwhich is called class constructor or initialization method that python calls when you create new instance of this class you declare other class methods like normal functions with the exception that the first arg ument to each method is self python adds the self arg ument to the list for youyou don' need to include it when you call the methods creating instance objectst create instances of classyou call the class using class name and pass in whatever arg uments its __init__ method accepts "this would create first object of employee classemp employee("zara" "this would create second object of employee classemp employee("manni" accessing attributesyou access the object' attributes using the dot operator with object class variable would be accessed using class name as followsemp displayemployee(emp displayemployee(print "total employee %demployee empcount nowputting all the concepts tog ether#!/usr/bin/python class employee'common base class for all employeesempcount def __init__(selfnamesalary)self name name self salary salary employee empcount + def displaycount(self)print "total employee %demployee empcount def displayemployee(self)print "name "self name"salary"self salary "this would create first object of employee classemp employee("zara" "this would create second object of employee classemp employee("manni"