Question: Python Function name: remove ingredients Parameters: recipeList (list of tuples of strings), allergyList (list of strings) Returns: list of tuples of strings Descri minute you

Python  Python Function name: remove ingredients Parameters: recipeList (list of tuples of

Function name: remove ingredients Parameters: recipeList (list of tuples of strings), allergyList (list of strings) Returns: list of tuples of strings Descri minute you realize your BFF is allergic to a few ingredients. You are given a recipeList which is a list of tuples. Each tuple represents a dish and contains strings representing the ingredients of the dish. The second parameter, allergyList, is a list of things that your friend is allergic to. For this function, go through the ingredients for each dish (tuple) and remove the ingredients that she/he is allergic to. Return a new list of tuples representing the modified dishes without the ingredients ption: You prepared a list of dishes you wanted to try while on vacation, but at the last Notes: Your code should not allow capitalization to change the searching of the ingredients. So for example, if "Spinach" is in the dish, and "spinach" is on the allergy list, the ingredient Spinach" would be eligible to be removed. You will need to add the original casing of the ingredients to your final list. >recipeList [(Turkey, 'cheese'. 'spinach'). (CHICKEN', onions', 'sugar). (pork, 'oregano', bread) >>>allergyList ['brussel sprouts', 'OREGANO', Bell Peppers', onions', Spinach] >>remove_ingredients(recipeList, allergyList) (Turkey, 'cheese'), ('CHICKEN:, sugar), (pork, bread)]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!