Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions