The first thing to know about special methods is that they are meant to be called by the Python interpreter, and not by you. You don't write my_object.__len__(). You write len(my_object) and, if my_object is an instance of a user-defined class, then…