Classes in Python
Defining a Class
Python is by nature an object-oriented programming language. A lot of Python's functionality is thus organized in classes and objects and working with classes is the standard way for most Python projects
A class is defiuned as follows:
Instances
Once a class definition has been evaluated, instances can be created and methods can be called.
Output:
Inheritance
The following example shows how the SecondClass inherits all mehods and variables from the FirstClass. An additional method is implemented in the child class: