Pavel Pokor3,145 Points
Why isn't this version of shopping list code working? Can't figure where I made the mistake.
def shopping_list(): shopping_items =  while True: new_item = input("Enter an item you want on the shopping list. To quit type 'DONE' ") if new_item.upper == 'DONE': print(shopping_items) exit() else: shopping_items.append(new_item) shopping_list()
Frank Simser2,186 Points
Hi Pavel! You didn't mention what your issue is, so I'm guessing it's that typing DONE (or 'done') doesn't end the loop. The problem is that "upper" is actually a function which requires the "()" after the function call, even if you don't have an argument to give it. That line should read:
if new_item.upper() == 'DONE':