Question: Implement the show_files parameter for the generate_dir_report function. The parameter is bool and its default value is True. If set to True the report lists

Implement the show_files parameter for the generate_dir_report function. The parameter is bool and its default value is True. If set to True the report lists the directories as well as the files. However, when set to False the report omits the lines listing the files and only lists directories.

Step by Step Solution

3.59 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import os def generatedirreportrootpath outputfile showfilesTrue with openoutputfile w as file fo... View full answer

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 Programming Questions!