CSC 242 Daily Exercise 3 Python Recursive filePrint()

Write a recursive function filePrint() that takes as parameters a pathname of a folder as a string and an integer indent and prints to the screen the pathname of every file contained in the folder, directly or indirectly.  The file path names should be output with an indentation that is proportional to their depth with respect to the topmost folder and should use the parameter indent to achieve this.  You are allowed to use a loop in this function, but the main work of the function should be done using recursion.

Leave a Reply

Your email address will not be published. Required fields are marked *

  • File Format: Python .py
  • Version: 3.5.x and 2.7 Both