Python doesn't have abstraction it uses inheritance to solve this
There are four principle of OOP:
- Inheritance - Creating a new class which is derivative of an existing class
- Polymorphism - The ability of a function to change its behaviour when called by different objects
- Encapsulation - Limiting access to method and variables by encasing them in a single unit of scope.
- Abstraction - Hides implementation details for security
There are many more important concepts in OOP such as:
- Method Overloading
- Method Overriding
- Constructors … So on
Everything in python is an object or derived from object class
Abstract Class
- Can have one or more abstract method
- Child of Abstract Class: Can only be instantiated if all the abstract method are overridden.
The abstract class can be defined without using a abstractmethod