MCQs > IT & Programming > Python > Given a program that saved a text file in the directory '/temp_files', which of the following will make sure that '/temp_files' exists before writing the file?

Python MCQs

Given a program that saved a text file in the directory "/temp_files", which of the following will make sure that "/temp_files" exists before writing the file?

Answer

Correct Answer: if not os.path.exists("/temp_files"): os.makedirs(d)

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

More Python MCQ Questions

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it