Question: Write a python function called myFind which accepts 2 parameters ( tmp --a string and strToLocate --a string or single character). It should return the
Write a python function called myFind which accepts 2 parameters ( tmp --a string and strToLocate --a string or single character). It should return the POSITION (an integer) of the first occurrence of strToLocate in tmp. If it isnt present, it should return -1. DO NOT use Pythons find methods.
Example: result = myFind( This is missing, is); print(result) #output is 2
Example: result = myFind( This is missing, not); print(result) #output is -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
