I have different product groups, let's say toys, clothes and food. When I get a series (or list) of products I want to know if they all fall in one group or if I have products from a few groups.
Let's make an example:
toys=['Car', 'Teddy Bear', 'Doll']
food=['Banana', 'Cola', 'Bread', 'Milk']
So when I get ['Cola', 'Milk'] I want it to return True (they all fall in food) and when I get ['Milk', 'Banana', 'Car'] I want it to return False (contains products of both toys AND food).
Is there a way to check this other than looping trough all my groups and checking one by one if all products are in that specific group?
Thank you!