Dictionary advice

Hello everyone,

so I am new in the programming world, and just begun to wrestle with dictionaries. I am trying to write a program which tells me how many ate a certain food. I have a simplification of the program here but my dataset is way bigger. How can I instead of returning names return ints of the amount of people who ate apple, bread, or chocolate?

ate = {"apple": "Thomas", "James" "bread": "Johnny", "Jamie" "Chocolate": "Michael",}

1 comments · 50% upvoted · other discussions

comments

No public comments to show.