<p><strong>Abstract base classes introduce virtual subclasses, that don’t inherit from a class but are still recognized by isinstance() and issubclass().</strong></p>
<h3id="abc">ABC</h3>
<p><strong>An abstract base class introduces virtual subclasses, that don’t inherit from it but are still recognized by isinstance() and issubclass().</strong></p>
<pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">from</span> numbers <spanclass="hljs-keyword">import</span> Integral, Rational, Real, Complex, Number
<pre><codeclass="python language-python hljs"><str> = <str>.strip() <spanclass="hljs-comment"># Strips all whitespace characters from both ends.</span>