Python list all files in directory and subdirectories with extension. Here's how you can use os.