nowwe can instantiate an oddcontainer object and determine thateven though we did not extend containerthe class is container objectfrom collections import container odd_container oddcontainer(isinstance(odd_containercontainertrue issubclass(oddcontainercontainertrue and that is why duck typing is way more awesome than classical polymorphism we can create is relationships without the overhead of using inheritance (or worsemultiple inheritancethe interesting thing about the container abc is that any class that implements it gets to use the in keyword for free in factin is just syntax sugar that delegates to the __contains__ method any class that has __contains__ method is container and can therefore be queried by the in keywordfor example in odd_container true in odd_container false in odd_container true " stringin odd_container false creating an abstract base class as we saw earlierit' not necessary to have an abstract base class to enable duck typing howeverimagine we were creating media player with third-party plugins it is advisable to create an abstract base class in this case to document what api the thirdparty plugins should provide the abc module provides the tools you need to do thisbut 'll warn you in advancethis requires some of python' most arcane conceptsimport abc class medialoader(metaclass=abc abcmeta)@abc abstractmethod def play(self)pass @abc abstractproperty def ext(self)