Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ALL IN PYTHON Problem 3 Write the recursive function get_files_list, which takes a valid Path object representing a path to some directory/folder on a computer.

image text in transcribedALL IN PYTHON

Problem 3 Write the recursive function get_files_list, which takes a valid Path object representing a path to some directory/folder on a computer. The function should return a list of Path objects for all paths that are files (and not folders) The given path is guaranteed to exist, so you do not need to validate it in your solution. You are required to use the pathlib library appropriately in your solution some potentially useful information is below. Assume Path is imported from pathlib. Path.is_dir(self) Path. ?terdir (self) Returns if a Path is a directory Allows iteration through subdirectories of a Path The Path constructor takes in a string representing a path def get filles. list(path: Path) - [Path]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is absorption costing?

Answered: 1 week ago

Question

=+ What is their expected negotiating style?

Answered: 1 week ago