class Bill():
def __init__(self,description):
self.description=description
class Tail():
def __init__(self,lenght):
self.lenght=lenght
class Duck():
def __init__(self,bill,tail):
pass
def about(self):
print(bill.description,tail.lenght)
tail=Tail('long')
>>> bill=Bill('wide')
>>> duck=Duck(bill,tail)
>>> duck.about()
wide long
и этот
class Bill():
def __init__(self,description):
self.description=description
class Tail():
def __init__(self,lenght):
self.lenght=lenght
class Duck():
def __init__(self,bill,tail):
self.bill=bill
self.tail=tail
def about(self):
print(bill.description,tail.lenght)