How to define a class in Python language ?
First you need to know that a class is an object type created by executing a class statement.
The simple way to write a class is to use class keyword, then write de class name, and inside the class you can declare variables, functions, methods.
Methods are defined as functions inside the class definition. When declare an function or method inside the class, then use self keyword for the name of first argument.
Create simple class
>>> class TestClass:
a = "Test"
return print("The class output")
>>> x = TestClass()
The class output
Define class with more arguments
>>> class myClass:
def sum(self, arg1, arg2, arg3):
s = arg1 + arg2 + arg3
>>> x = myClass()