What are the four pillars of OOP?
Short Answer
Encapsulation (bundling data + methods), Abstraction (hiding complexity), Inheritance (reusing code from parent), Polymorphism (same interface, different behavior).
Key Points
- Encapsulation: Use private attributes (_name, __name)
- Abstraction: ABC module, abstract methods
- Inheritance: single, multiple, multilevel
- Polymorphism: method overriding, duck typing
💡 Memory Trick: "A PIE — Abstraction, Polymorphism, Inheritance, Encapsulation"