title: Hybrid Inheritence
body: <p>I want to develop a code for hybrid inheritance but this code is not working. Please could you explain me the error and also how can I make this  code better.</p>
  <pre><code># creating parent class
  class Parent1:
      BloodGroup = 'A'
      Gender = 'Male'
      Genetic_Disease = 'Diabetes'
  
  class Parent2:
      BloodGroup = 'B'
      Gender = 'Female'
      Genetic_Disease = 'Autism' 
  
      # creating child class
  class Child(Parent1,Parent2): # inheriting parent class
      BloodGroup = 'A'
      Gender = 'Female'
      Genetic_Disease = 'Diabetes'
      
      def print_data():
        print(BloodGroup, Gender, Genetic_Disease)
      
  # creating object for child class
  child1 = Child()
  # as child1 inherits it's parent's disease printed data would be it's parent's
  child1.print_data()
  </code></pre>