Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a function that takes two strings and returns a list of integer indexes. The returned list contains the indexes of each occurence of the

Create a function that takes two strings and returns a list of integer indexes. The returned list contains the indexes of each occurence of the substring. Do not use the built-in find function of strings. Arguments: my_str (str): A string to be searched using my_substr string. my_substr (str): The substring to be searched in my_str string. Returns: list: A list of integer indexes of each occurence of the substring. Examples: print(my_find('elementary', 't')) [6] print(my_find('computer', 'A')) [] print(my_find('Hello Hello Hello there', 'Hello')) [0, 6, 12] print(my_find('soon will I rest, yes, forever sleep', 'e')) [13, 19, 26, 28, 33, 34] 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

2. How were various roles filled?

Answered: 1 week ago

Question

2. What process will you put in place to address conflicts?

Answered: 1 week ago