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

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!