In Python, `__len__` is a special method (also known as a dunder method, short for "double underscore") that is used to define the behavior of the built-in `len()` function for instances of a class. When you implement `__len__` in your custom class, you allow Python to know how to compute the length of instances of that class.
Here's a breakdown of how `__len__` works:
- When you call `len(instance)` on an instance of a class, Python implicitly