title: Python: How to pass an object into another class's parameter?
body: <p>I am new to Python. And I was trying to make a class that uses another object's functions within it but I'm not sure how to do this. Any help is appreciated. Thank you!!</p>
  
  <p>So this is a rough example of what i want to do </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>class Dog:
   def bark(self):
    print("Hello")
  
  class DogHouse:
   def __init__(self, dog):
    self.owner = dog
  
   def bark2(self):
    ???</code></pre>
  </div>
  </div>
  </p>
  
  <p>So I want to be able to call the dog's bark within DogHouse, but I'm not sure how to do this correctly.</p>