I think I might not have explained my question clearly. I apologise for that. I will try again.
I have a parent class with certain attributes:
class Restaurant():
'This is the restaurant class'
def __init__(self, name, cuisine_type):
self.name = name
self.cuisine_type = cuisine_type
Then I have a child class inheriting all the parent's attributes and adding a new one:
class IceCreamStand():
def __init__(self, *flavor):
'Attributes of parent class initialised'
self.flavor = flavor
Now I try printing a list of of flavours stored in the attribute flavor:
def desc_flavor(self):
print('This Ice_Cream shop has ' + self.flavor + ' flavors')
flavor1 = IceCreamStand('Mango', 'Raspberry', 'Coffee', 'Vanilla')
If I use concat I get the message saying that the name is not defined.
My apologies for not explaining the problem correctly the first time and thanks for all the help.