Question: Python Solution, please A Company is running a promotion. Customers purchased a secret list of fruit will receive prizes. Notice the order of the fruits

Python Solution, please
A Company is running a promotion. Customers purchased a secret list of fruit will receive prizes. Notice the order of the fruits matters. Also, there can be a keyword anything in the secretFruitList which can be used for any type of fruit. Examples Example 1: Input: customerPurchased List = [orange, mongo, strawberry, watermelon, mongo] secretFruitLists = "[[orange, mongo], [watermelon, mongo]] Output: true Example 2: h Input: customerPurchased List = [watermelon, orange, mongo] secretFruitLists = [[watermelon, anything, mongo]] secretFruitLists = [[orange, mongo], [watermelon, mongo]] Output: true Example 2: Input: customerPurchased List [watermelon, orange, mongo] secretFruitLists [[watermelon, anything, mongo]] Output: true Example 3: Input: customerPurchased List = [watermelon, apple, orange, mongol secretFruitLists = [[watermelon, anything, mongo]] Output: false 11:01 PM A Company is running a promotion. Customers purchased a secret list of fruit will receive prizes. Notice the order of the fruits matters. Also, there can be a keyword anything in the secretFruitList which can be used for any type of fruit. Examples Example 1: Input: customerPurchased List = [orange, mongo, strawberry, watermelon, mongo] secretFruitLists = "[[orange, mongo], [watermelon, mongo]] Output: true Example 2: h Input: customerPurchased List = [watermelon, orange, mongo] secretFruitLists = [[watermelon, anything, mongo]] secretFruitLists = [[orange, mongo], [watermelon, mongo]] Output: true Example 2: Input: customerPurchased List [watermelon, orange, mongo] secretFruitLists [[watermelon, anything, mongo]] Output: true Example 3: Input: customerPurchased List = [watermelon, apple, orange, mongol secretFruitLists = [[watermelon, anything, mongo]] Output: false 11:01 PM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
