title: Create a inherited class with user input
body: <p>I'm trying to code a product inventory project. I stumbled across this problem and have been searching since a few days but couldn't find any way to do it. How can I create a class inherited from the base class with user input.. </p>
  
  <p>Here is the base class:</p>
  
  <pre><code>class Product:
      def __init__(self, title, color, price):
          self.title = title
          self.color = color
          self.price = price
  </code></pre>
  
  <p>what I'm trying to achive is that user will be able to add products himself by lets say pressing 2 will ask him to enter the product type (coat) and than the parameters specific to the product which will create a new class inherited from the base class. Like this:</p>
  
  <pre><code>class coats(Product):
      def __init__(self, material, size):
      self.material = material
      self.size = size
  </code></pre>
  
  <p>I can create instances with user input but creating inherited classes I couldn't figure it out. I appreciate if you could help. Thanks.</p>