MCQs > IT & Programming > Python > What is the correct way to open the file 'test.txt' and append the text 'foo' to it?

Python MCQs

What is the correct way to open the file "test.txt" and append the text "foo" to it?

Answer

Correct Answer: with open("test.txt", "a") as myfile: myfile.write("foo")

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