Question: Need help with Python problem: Implement a recursive function search () that takes as parameters the name of a file and the pathname of a

Need help with Python problem:

Implement a recursive function search() that takes as parameters the name of a file and the pathname of a folder and searches for the file in the folder and any subfolder contained within it, directly or indirectly. The function should return the pathname of the file, if found, or None (the type in Python, not the string 'None') if the file cannot be found in the folder or in any subdirectory of the folder. You are allowed to use a loop in this function, but the main work of the function should be done using recursion.

Need help with Python problem: Implement a recursive function search() that takes

Python 3.4.1 Shell File Edit Shell Debug Options Windows Help search file txt test testi file A. txt ans search file txt test an 8 test folder 11 file B. txt search fileE txt test test\ folder 21 fileE .txt search file 2.txt test search test file 1.txt test path test patht directory directoryA1 ltestfileA1.txt' search test file2. py test path test patht directory directory B21 testfile2. py' search test file 3.py test path Ln: 97 Col: 4

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!