def print_files_in_dir(root_dir, prefix): files = os.listdir(root_dir) for file in files: path = os.path.join(root_dir, file) f.write(path +