Question: Using Python; Ask user to type two texts: a sentence, where your program is going to search for a word, and a word (combination

Using Python;

" Ask user to type two texts: a sentence, where your program is going to search for a word, and a word (combination of characters to search).

Find, how many times second text is found in the first one and the number of the position where the first occurrence starts.

If the second text is not included in the first one, print a message. "

Answer to this: Continue with the previous task and print all other start positions of the second text in the first one.

Example:

Using Python; " Ask user to type two texts: a sentence, where

Type your sentence here: Alice likes to swim, she likes to ski and she likes to skate. Type the combination of characters to search: like Your characters are found 3 times The first occurence starts at 6 Next occurence starts at 25 Next occurence starts at 46 >>> |

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!