Question: My code isn't printing correctly 1 HWite a function called search _ in _ files. search _ in _ files 2 Hshould have two parameters:

My code isn't printing correctly 1 HWite a function called search_in_files. search_in_files 2 Hshould have two parameters: a filenare and a string to search for. 3\#search_in_files should return a list of line numbers as integers 4 twhere the string appeared. Note that the string at that index does 5\#not rieed to BE the search string, but rather must just contain it.6\#You should assume that the first line in a file is line 1, not line \(7=1\)e.\(8=\)9\#for example, if the files contents was: 18 itcat 12 Acats 12\#dog 13\#ddogs 14\#catsup 15 if 16 "Then search_in_files ("input_file.txt" "cat") would return 17 in \([1,2,5]\), because "cat" appears on 1ines 1,2, and 5.23\#Add your code herel 42 wThe code below will test your function. You can find the file it 43 Ereferences in the drop-down in the top left. If your code works, 44 Hthis should print:

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!