Answered step by step
Verified Expert Solution
Link Copied!

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

Pythonimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

Students also viewed these Databases questions