Making a purchase, weird error


This is the error
compute_bill(['apple']) resulted in a TypeError: 'dict' object is not callable

I've looked over all the other questions and I think I'm using the same exact code but mine keeps giving this error

# Write your code below!
def compute_bill(food):
    total = 0
    for item in food:
        total += prices(food)
    return total



total += prices(food)

using parentheses will make it a function call, to get a value from a dictionary use square brackets


compute_bill(['apple']) resulted in a TypeError: unhashable type: 'list'

getting this error when I used square brackets


food is a list, lists can't be keys. Which variable should be used there?


it should be prices[item]
im so dumb, thanks so much