quick question regarding loops in OOP.
Why does my code below not print out “brunch” and beneath it “kids”?
I get the solution and why I have to fill an empty list with the menus, but still don’t get why my “false” code below only spits out “brunch”.
def init(self, address, menus):
self.address = address self.menus = menus
def available_menu(self, time):
for menu in self.menus:
if time >= menu.start_time and time <= menu.end_time: return menu.name