I used the following code (located at the bottom of the question) and it worked. That said, I'm confused:
Would someone please explain it line-by-line? The specific question that I don't understand is, "why are we creating an argument 'food' that correlates to a list called 'food' when the list doesn't exist and we're only scrolling through 'prices' to source our answer?" There's probably a simple answer, but it's escaping me right now...
Any help would be appreciated.
total = 0
for x in food:
total += prices[x]