I have two classes. When I create an instance in the first one would like to work with its attributes in my second class.
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)
Now I create a instance >>> Max = Dog(15) and want the class "Statistics" be able to gain its value "number_of_tricks". For example something like >>> stat = Statistics(), >>>stat.get_number_of_tricks()
selftosnelfinget_number_of_tricks?