Combining dictionary values with list
Hey, I have a task which I need help with. I'm not very good at describing so I will simplify an example: Strawberry is number one, Banana is number two and Apple is number three. Number one shouldn't be eaten with three, number two shouldn't be eaten with one and number three shouldn't be eaten with two. My task now is to write a program that will show the output like this: "Strawberry shouldn't be eaten with Apple" etc. This is what I did until now: fruits = {'1': 'Strawberry', '2': 'Banana', '3': 'Apple'} not_eaten = [3, 1, 2] How can I combine my list with the dictionary so that my numbers from 'not_eaten' will show the corresponding values from the dictionary? In this example my list would look like ['Apple', 'Strawberry', 'Banana']. My real task is much longer and doing this manually by looking each one up is not an option. I'm sorry if this is badly explained and thank you in advance!