Python — From Basics to Advanced · OOP — Object-Oriented Programming
Special Methods (Dunder)
OOP — Object-Oriented Programming
Introduction
Dunder methods — named __like_this__ — let your objects behave like built-in types. print, +, ==, and len() all work by calling the appropriate dunder method behind the scenes.