MCQs > IT & Programming > Python >

Which of the following is the correct way to recursively find files with the extension ".html" in the directory "site" with Python?

Python MCQs

Which of the following is the correct way to recursively find files with the extension ".html" in the directory "site" with Python?

Answer

Correct Answer: import fnmatch import os matches = [] for root, dirnames, filenames in os.walk('site'): for filename in fnmatch.filter(filenames, '*.html'): matches.append(os.path.join(root, filename))

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it