class
class is used to define a new user-defined class in Python.
Class is a collection of related attributes and methods that try to represent a real world situation. This idea of putting data and functions together in a class is central to the concept of object-oriented programming (OOP).
Classes can be defined anywhere in a program. But it is a good practice to define a single class in a module. Following is a sample usage:
class ExampleClass:
def function1(parameters):
…
def function2(parameters):
…