Basta Fazoolin string interpolation problem

Hello guys, someone can explain me why the repr() method is returning me this weird interpolation?

(‘Brunch’,) is available from (11,) to 16

class Menu:
    def __init__(self, name, items, start_time, end_time): = name,
        self.items = items,
        self.start_time = start_time,
        self.end_time = end_time
    def __repr__(self):
        return "{name} is available from {start} to {end}".format(, start=self.start_time, end=self.end_time)

brunch_items = {
                'pancakes': 7.50, 
                'waffles': 9.00, 
                'burger': 11.00, 
                'home fries': 4.50, 
                'coffee': 1.50,
                'espresso': 3.00, 
                'tea': 1.00, 
                'mimosa': 10.50, 
                'orange juice': 3.50
brunch = Menu('Brunch', brunch_items, 11, 16)

I also tried to follow the “get unstuck” video:

return + ' menu available from ' + str(self.start_time) + ' - ' + str(self.end_time)

but for some reason I have this error:

TypeError: can only concatenate tuple (not “str”) to tuple

My bad, I am too tired, need a break!
I didn’t noticed the commas in the constructor LOL

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.