Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Pass the Sauce Index In lecture, the pass_the_sauce function was defined as: 1 def pass_the_sauce (l): if sauce 1[0]: 2 3 5 == print(I got
Pass the Sauce Index In lecture, the pass_the_sauce function was defined as: 1 def pass_the_sauce (l): if "sauce" 1[0]: 2 3 5 == print("I got the sauce") return "sauce" return pass_the_sauce (1[1:]) PYTHON [] Instead of returning a string, modify this function to return the index location of the sauce. Example: condiments = ['salt', 'pepper', 'sauce'] ass_the_sauce(condiments) should return 2 because condiments[2] == 'sauce' Assume "sauce" is always in the list
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started