MCQs > IT & Programming > Python > Consider the Python function: def secret_function(sPath): import os for sChild in os.listdir(sPath): sChildPath = os.path.join(sPath,sChild) if os.path.isdir(sChildPath): secret_function(sChildPath) else: print(sChildPath) What would be the most correct statement to describe above function?

Python MCQs

Consider the Python function: def secret_function(sPath): import os for sChild in os.listdir(sPath): sChildPath = os.path.join(sPath,sChild) if os.path.isdir(sChildPath): secret_function(sChildPath) else: print(sChildPath) What would be the most correct statement to describe above function?

Answer

Correct Answer: This function takes the name of a directory and prints out the paths files within that directory as well as any files contained in contained directories.

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