Python_Institute
PCPP-32-101 · Question #81
Which method is used to open a file for both reading and writing in text mode?
The correct answer is D. open(file, "r+"). You've hit your limit · resets 5am (America/New_York)
Working with Files
Question
Which method is used to open a file for both reading and writing in text mode?
Options
- Aopen(file, "r")
- Bopen(file, "w")
- Copen(file, "a")
- Dopen(file, "r+")
How the community answered
(22 responses)- A5% (1)
- B5% (1)
- D91% (20)
Explanation
You've hit your limit · resets 5am (America/New_York)
Topics
#file modes#open function#r+ mode#read write
Community Discussion
No community discussion yet for this question.