Stocking Out


def compute_bill(food):
for item in food:
if stock[item]>0:
return total

print compute_bill(shopping_list)

This should be working but I don't understand why codecademy's python interpreter is giving the wrong response.


Hello, @obsaa!
In fact your code is correct, I'd suggest you to refresh the page and try again or even change browsers.
There are times our interpreter, if I can call it like this, bugs and makes you something with your code is wrong when everything is okay.

Best regards,