"Oops, try again. calling compute_bill with a list containing 1 apple, 1 pear and 1 banana caused the following error: local variable 'item' referenced before assignment"
So i'm stuck at this point and i keep getting this error message. What's wrong? ):
def compute_bill(food): total = 0 if stock[item] > 0: for item in food: total += prices[item] stock[item] = stock[item] - 1 return total