Question: 6.7 python Write a recursive function, displayFiles, that expects a pathname as an argument. The pathname can be either the name of a file or
6.7
python
Write a recursive function, displayFiles, that expects a pathname as an argument. The pathname can be either the name of a file or the name of a directory. If the pathname refers to a file, its name is displayed, followed by its contents. Otherwise, if the pathname refers to a directory, the function is applied to each name in the directory. Test this function in a new program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
