Question: Python 2. Implement a recursive function dirsWithFiles() that takes as parameters the name of a directory. The function should return a list containing the full

Python
2. Implement a recursive function dirsWithFiles() that takes as parameters the name of a directory. The function should return a list containing the full pathname of all occurrences of directories that contains files (containing only directories doesn't count). Please note that your function must work as described on any directory structure, not just the one provided as an example. The following illustrates a sample set of directories located in the zip file containing the assignment template. >>> dirswithFiles (Test) ['Test\\Testi\\Testi-A', Test\\Testi\\Test1-B\\Test1-B-B', 'Test\\Testi\\Test1-c\\c3', 'Test\\Test2\\\\B1-1\\B2-2\\\\B', Test\\Test3\\A\\B', 'Test\\Test3\\A', 'Test\\Test3', 'Test']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
