Answered step by step
Verified Expert Solution
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.
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. 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started