Question: 1 Implement a recursive function findAllDirectorieso that takes as parameters the name of a root directory and a string to search for all directories that

 1 Implement a recursive function findAllDirectorieso that takes as parameters the

1 Implement a recursive function findAllDirectorieso that takes as parameters the name of a root directory and a string to search for all directories that have that name. The function should return a list containing the full pathname of all occurrences of directories with the directory name specified. 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 directories located in the zip file containing the assignment template. >>> print (findA11Directories('Test", 'B4')) ['TestlITestllITestl-Al\Testl -B-BIIB4'1 >> print (findAl1Directories (os.path.join ('Test', 'Testi), 'B4')) es.mesesti-A-AB1B4, estizestiliTestl-AlVTest1-A-ANB 84 \ \B4","Test \ \ TestTest1-B \ \ rest1-B-A11B3\ \B4", ,Tes t \ \ Test1 \ \Test1-B\ \ Test1 B-BI1B4' >>> print (findAllDirectories (os.path.join('Test' , 'Test2), 'B4)> [1 >print (Eindalibirectories (os.path.join('Test , 'Test3), 'B) ('Test \ \ Test3 \ \

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!