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 asecret list of fruit will receive prizes. Notice the order of thePython 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

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!