Creating Classes in Python - Tutorialspoint
www.tutorialspoint.com › creating-classes-in-pythonJan 30, 2020 · Following is the example of a simple Python class − class Employee: 'Common base class for all employees' empCount = 0 def __init__(self, name, salary): self.name = name self.salary = salary Employee.empCount += 1 def displayCount(self): print "Total Employee %d" % Employee.empCount def displayEmployee(self): print "Name : ", self.name, ", Salary: ", self.salary