python how to get instance variables of a class to another class?
<p>I have two classes. When I create an instance in the first one would like to work with its attributes in my second class.</p>

<pre><code>class Dog(object):
    def __init__(self, number):
        self.number_of_tricks = number

class Statistics(object):
    def get_number_of_tricks(self):
        return Dog(Max.number_of_tricks)
</code></pre>

<p>Now I create a instance <code>&gt;&gt;&gt; Max = Dog(15)</code> and want the class "Statistics" be able to gain its value "number_of_tricks". For example something like <code>&gt;&gt;&gt; stat = Statistics()</code>, <code>&gt;&gt;&gt;stat.get_number_of_tricks()</code></p>