Question: I need this done in python Make a string match program using a finite automata. However, you need to modify it so it finds the
I need this done in python
Make a string match program using a finite automata. However, you need to modify it so it finds the patter either forwards or backwards. The first word in the input file is the pattern (on its own line). The second word will be the string you are trying to match. Output all indexes where a match starts happening. assume we will only put the normal 26 English letters in lower case for both the pattern and string. It's possible for a pattern to match twice if its symmetric.
Sample input file (all characters on a single line with no spaces between):
abcc abccbabcc
Corresponding sample output.txt file (spaces separating indexes (no space after final index)):
0 2 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
