Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 'JStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started