# dir() function to see the number of magic methods inherited by a class: print(dir(MyClass))
>>> y = [5, 4, 3, 2, 1] >>> y.__contains__(3) True >>> y.__contains__(6) False