Question: #Write a function called fancy_find. fancy_find should have #two parameters: search_within and search_for. #fancy_find should check if search for is found within the #string search_within.

\#Write a function called fancy_find. fancy_find should have \#two parameters: search_within and search_for. \#fancy_find should check if search for is found within the \#string search_within. If it is, it should print the message \#" [search_for] found at index [index]!", with [search_for] \#and [index] replaced by the value of search_for and the \#index at which it is found. If search_for is not found \#within search within, it should print, "[search for] was \#not found within [search_within]!", again with The values \#of search_for and search_within. \#For example: fancy_find("ABCDEF", "DEF") "DEF found at index 3 !" fancy_find("ABCDEF", "GHI") "GHI was not found within ABCDEF!" \#Add your function here! \#Below are some lines of code that will test your function. \#You can change the value of the variable(s) to test your \#function with different inputs. \#If your function works correctly, this will originally Hprint: \#DEF found at index 3 ! \#GHI was not found within ABCDEF
Step by Step Solution
There are 3 Steps involved in it
python def fancyfindsearchwithin searchfor Find the index of searchfor in searchwithin i... View full answer
Get step-by-step solutions from verified subject matter experts
