Object-Oriented Python
Model real things as classes with data (attributes) and behaviour (methods).
Easy
Object-oriented programming (OOP) groups related data and functions into classes. Its main ideas are encapsulation (keep details inside), inheritance (reuse and specialise) and polymorphism (one interface, many implementations).
Sub-topics (3)
Classes and Objects
A class is a blueprint; objects are instances with their own data.
Easy♥ 0🔖 0💬 0
Inheritance in Python
A subclass reuses and extends a parent class's behaviour.
Easy♥ 0🔖 0💬 0
Dunder Methods
Special __methods__ let your objects work with built-in syntax like +, len() and print().
Intermediate♥ 0🔖 0💬 0
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.