Question: Python Implement a recursive function findAll() that takes as parameters the name of a folder and a string to search for in the files contained
Python
Implement a recursive function findAll() that takes as parameters the name of a folder and a string to search for in the files contained within it. The function should return a list containing the full pathname of all occurrences of the file with the string. Please note that your function must work as described on any directory structure, not just the one provided as an example.
1 Implement a recursive function findAllO that takes as parameters the name of a folder and a string to search for in the files contained within it. The function should return a list containing the full pathname of all occurrences of the file with the string. Please note that your function must work as described on any directory structure, not just the one provided as an example. The following illustrates several searches using a sample set of folders and directories located in the zip file containing the assignment template >>>findAll ('Test','winter) Testl-cYIC3file3.txt''TestITest3file3.txt'] >>> findll ('Test,'Zoko' ('Test\\Test1 \ \Test1-a1 \ filel't '-Test \ \Test311A\\B\ \ file1 . txt ', 'Test \ \ Test3 filel.txt'] >>>findAll ('Test', 'assignment') 'Test \ \ Test3 \ \A\ 1.8\ \file2. 21 \B\ \B\ \file2. txt ,, ,Test \ \Test3 \ \A \ \B\ \file1. txt', txt', 'Tes t \ \ Test3\\file1.txt 'J
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
