food is expected to be a list. However once we define it as a value in the for statement the list vanishes.
for item in food: total += prices[item]
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.